[LLVMbugs] [Bug 10132] New: clang c++ missing error on union with multiple members initialized

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 13 11:16:19 PDT 2011


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

           Summary: clang c++ missing error on union with multiple members
                    initialized
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Testcase:
union U { int a, b; U() : a(10),b(20) {} };

clang accepts this.  gcc gives:
<stdin>: In constructor ā€˜U::U()ā€™:
<stdin>:1: error: initializations for multiple members of ā€˜Uā€™

-- 
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