If I cast an int to the enum type all values outside the enum triggers the first case-statement.
The number of enum values is important. It must be a power of 2. This works in GCC 4.3.4. -- Summary: switch with enums doesn't work Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Woebbeking at web dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41425