Take the following code: struct f1 { int i; }; void f(void) { static struct f1 *f2 = &(struct f1){1}; }
This is valid C99 at least according to both ICC and Comeau. And we acceptted it in 3.0.4 also. -- Summary: [3.4/4.0/4.1 Regression] Rejects valid C99 address of C99 struct in static variable in function Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22529