[LLVMbugs] [Bug 12023] New: clang incorrectly accepts initializer for array new

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Feb 16 15:31:30 PST 2012


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

             Bug #: 12023
           Summary: clang incorrectly accepts initializer for array new
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Testcase:

struct CopyCounter
{
    CopyCounter();
    CopyCounter(const CopyCounter&);
};

int main()
{
    CopyCounter* f = new CopyCounter[10](CopyCounter());
    return 0;
}

I'm pretty sure this isn't supposed to be allowed... but somehow, it is.

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