https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105430
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |needs-stdcheck, wrong-code
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
btw, clang rejects this with
t.c:17:33: warning: initializer partially overrides prior initialization of
this subobject [-Winitializer-overrides]
17 | const struct T t1 = { .s = s, .s.r.b = 5 };
| ^~~~~~~~
t.c:17:28: note: previous initialization is here
17 | const struct T t1 = { .s = s, .s.r.b = 5 };
| ^
t.c:17:16: error: cannot compile this static initializer yet
17 | const struct T t1 = { .s = s, .s.r.b = 5 };
| ^
1 warning and 1 error generated.
and we accept even with -std=c99 -pedantic -pedantic-errors