[LLVMbugs] [Bug 8468] New: Cannot initialize array in copy constructor

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 26 08:59:08 PDT 2010


           Summary: Cannot initialize array in copy constructor
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: grzegorz.dabrowski at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com

Clang cannot compile the following code:

#include <iostream>

class Test {
    Test(const Test& other);
    std::string fString[4];

Test::Test(const Test& other) : fString(other.fString)


array.cpp:11:33: error: array initializer must be an initializer list
Test::Test(const Test& other) : fString(other.fString)

... but g++ (4.4.x) compiles it. Is this clang bug?

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