http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54074
Bug #: 54074 Summary: [C++0x] initializer list accepts incorrect nested input Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ebewo...@gmail.com #include<cstring> #include<string> using namespace std; struct S1 { int i; string str; }; //nested struct S2 { int i; string str; S1 s1; }; int main() { //should be S2 s22{ 3, "Hello3", {4,"Hello4"} }; //but it compiles S2 s22{ 3, "Hello3", 4,"Hello4" }; FINISH_TEST(); }