https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88261
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid Status|UNCONFIRMED |NEW Last reconfirmed| |2018-11-29 Target Milestone|--- |9.0 Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. GCC 8 diagnoses it as array-6.c: In function ‘void foo()’: array-6.c:15:14: error: invalid use of array with unspecified bounds struct str c = { 2, "c" }; /* { dg-error "(non-static)|(near initialization)" } */ ^ array-6.c:15:14: error: invalid use of array with unspecified bounds array-6.c:16:14: error: invalid use of array with unspecified bounds struct str d = (struct str) { 2, "d" }; /* { dg-error "(non-static)|(near initialization)" } */ ^ array-6.c:16:14: error: invalid use of array with unspecified bounds array-6.c:17:14: error: invalid use of array with unspecified bounds struct str e = (struct str) { d.len, "e" }; /* { dg-error "(non-static)|(initialization)" } */ ^ array-6.c:17:14: error: invalid use of array with unspecified bounds