http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51458
Bug #: 51458 Summary: [4.7 Regression] Accepts invalid designated initializers Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org CC: ja...@gcc.gnu.org, ja...@gcc.gnu.org, reich...@gcc.gnu.org Depends on: 51229 +++ This bug was initially created as a clone of Bug #51229 +++ int a = { .foo = 6 }; int b = { [0] = 1 }; _Complex float c = { .foo = 0, 1 }; _Complex float d = { [0] = 0, 1 }; _Complex float e = { 0, .foo = 1 }; _Complex float f = { 0, [0] = 1 }; char g[] = { [7] = "abcd" }; should have all initializers rejected, but instead it ignores the designators and accepts it. The C FE rejects all but the last one.