[LLVMbugs] [Bug 11795] New: Clang accepts direct constructor call

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jan 18 13:59:10 PST 2012


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

             Bug #: 11795
           Summary: Clang accepts direct constructor call
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: jason.haslam at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Clang (incorrectly?) accepts:

struct A { A (); A (int); int i; };
A::A (int x) { A::A (); i = x; }

GCC 4.5 and above rejects this with the error:

cannot call constructor directly

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