$ cat t.cc enum class A { Val0, Val1 }; void foo( A a ) { switch( a ) { case A::Val0: break; case 1: break; } }
$ g++ -std=c++0x -c template.cc <works> I think there should be a compile error in line 8. -- Summary: no error with switch over enum class and integer case Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: joerg dot richter at pdv-fs dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44311