Switch statement: must default be the last case?
Consider the following switch statement: switch( value ) { case 1: return 1; default: value++; // fall-through case 2: return value * 2; } This code compiles, but is it valid (= defined behavior) for C90/C99? I have never seen code where the default case is not the last case. EDIT: As Jon Cage and … Read more