You are right -- Code::Blocks (which also uses MinGW ) doesn't produce warnings or errors on that either. VC++ 2008 Express produces a warning. I'm not familiar enough with gcc to know if there are any flags that will make that compiler produce a warning on it.
there are some flags which enables the missing of case or default or both in an out side of switch and when used with enum as case constant.
these are: gcc filename.c -Wswitch-enum
warns whenever a switch statement has an index of enumarated type and lacks a "case" for one or more of the named codes of that enumeration
or simply we can use gcc filename.c -Wall