This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/44311] New: no error with switch over enum class and integer case


$ 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]