https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59855
--- Comment #5 from Josh Triplett <josh at joshtriplett dot org> --- (In reply to Tom Tromey from comment #4) > Implemented on trunk. Thanks! Please consider including anonymous structs and unions in the test case as well: struct S { int a; union { int b; int c; }; } __attribute__((designated_init)); static struct S s = { .a = 0, .b = 0, }; union U { int a; struct { int b; int c; } __attribute__((designated_init)); }; static union U u = { .b = 0, .c = 0, }; Both of the cases above should produce no warnings; analogous positional initializers should produce warnings.