In C you need a break in each case unless you want fall-through.
case 0:
break;
EDIT: sorry I see what you are saying - the answer is I don't know. I've checked with previous versions of PellesC and get the same result.
EDIT1:
It would appear that PellesC is is not generating the right code. I've checked with two other compilers which both give the result you expect.
John