2 !!DESCRIPTION!! switch test
4 !!LICENCE!! public domain
11 void testlimits(int i) {
16 /* case 0xffff: */ /* 'range error' (-1) */
22 /* case 0x7fff: */ /* works */
23 case 32767: /* works */
24 /* case 32768: */ /* 'range error' (correct for that one!) */
30 case -32768: /* 'warning. constant is long' */
31 /* case 0x8000: */ /* 'range error' */
32 /* case -32769: */ /* 'range error' (correct for that one!) */
39 void testdefault1(unsigned char i) {
40 /* we want a signed char */
43 #ifdef REFCC_UNSIGNED_CHARS
61 printf(">%d\n",i);i++;
96 /* gcc warning: case label value exceeds maximum value for type */
97 /* cc65 error: range error */
137 printf(">>>default\n");
138 /* triggers bug if this break; is missing? */
144 void testdefault2(unsigned char i) {
145 /* we want a unsigned char */
148 #ifdef REFCC_UNSIGNED_CHARS
156 #ifdef UNSIGNED_CHARS
166 printf(">%d\n",i);i++;
239 printf(">>>default\n");
240 /* triggers bug if this break; is missing? */