[LLVMbugs] [Bug 13128] New: Rejects strongly typed enum with a member name same as the enums containing class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jun 16 18:20:52 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13128

             Bug #: 13128
           Summary: Rejects strongly typed enum with a member name same as
                    the enums containing class
           Product: clang
           Version: 3.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: blake+llvm at retroco.de
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


This:

class C {
  enum class E { C };
};

Gives the error:

test.cpp:2:18: error: member 'C' has the same name as its class
  enum class E { C };
                 ^
1 error generated.

GCC appears to handle it properly.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list