[LLVMbugs] [Bug 13217] New: Crash on in-class initialization of member of struct in union
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Tue Jun 26 16:31:28 PDT 2012
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=13217
             Bug #: 13217
           Summary: Crash on in-class initialization of member of struct
                    in union
           Product: clang
           Version: 3.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ampleyfly at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified
a.cpp:
struct A {
  union {
    struct {
      int a = 0;
    };
  };
};
clang++ -std=c++11 -c a.cpp causes clang to crash with a segmentation fault.
clang++ -c a.cpp yields:
a.cpp:4:13: warning: in-class initialization of non-static data member is a
C++11 extension [-Wc++11-extensions]
      int a = 0;
            ^
a.cpp:3:5: error: union member '' has a non-trivial constructor
    struct {
    ^
followed by crash with a segmentation fault.
-- 
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