This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43453] New: Initialization of char array with string literal fails in mem-initializer
- From: "schaub-johannes at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Mar 2010 03:06:23 -0000
- Subject: [Bug c++/43453] New: Initialization of char array with string literal fails in mem-initializer
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Fails to compile, but should work:
struct A {
char x[4];
A():x("bug") { }
};
Error i get is:
"main.cpp:3: error: array used as initializer"
--
Summary: Initialization of char array with string literal fails
in mem-initializer
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schaub-johannes at web dot de
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43453