https://llvm.org/bugs/show_bug.cgi?id=26048
Bug ID: 26048 Summary: Missing diagnostic for overloaded names in anonymous unions Product: clang Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: apra...@apple.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified class A { class B {}; union { B B; // This should be an error. }; // Name lookup error if uncommented. // sizeof(B); }; As of r256962 this compiles fine, however [class.union] §9.5.5 states that "The names of the members of an anonymous union shall be distinct from the names of any other entity in the scope in which the anonymous union is declared.” This does generate a name lookup error if B is used, but that's too late. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs