[LLVMbugs] [Bug 10289] New: Clang incorrectly takes an unnamed bitfield as a member

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 6 11:52:59 PDT 2011


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

           Summary: Clang incorrectly takes an unnamed bitfield as a
                    member
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: schaub.johannes at googlemail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


The following is valid C++03 code, as far as I can see

struct A {
private: 
  int : 0;
};

A a = { };

"A" is an aggregate, but clang complains

main1.cpp:6:3: error: non-aggregate type 'A' cannot be initialized with an
initializer list
A a = { };

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