This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44311] New: no error with switch over enum class and integer case
- From: "joerg dot richter at pdv-fs dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 May 2010 12:28:09 -0000
- Subject: [Bug c++/44311] New: no error with switch over enum class and integer case
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ 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