[LLVMbugs] [Bug 11650] New: Implement DR1301: reject value-initialization of unions with deleted constructors
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Sat Dec 24 15:45:22 PST 2011
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=11650
             Bug #: 11650
           Summary: Implement DR1301: reject value-initialization of
                    unions with deleted constructors
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified
clang currently accepts cases like this:
struct S {
  S();
  virtual int f();
  int n;
};
union U {
  S s;
  int m;
};
int u = U().s.n;
int v = U().s.f();
Under the resolution of DR1301, these cases are ill-formed: the default
constructor of U is deleted, so value-initialization of U is ill-formed.
-- 
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