1 /* Test for various initializer warnings being suppressed by use of
2 designated initializers. */
4 /* { dg-do compile } */
5 /* { dg-options "-std=c99 -W -Wall -Wtraditional" } */
30 struct t T0
= { 1 }; /* { dg-warning "(missing|near) init" } */
31 struct t T1
= { .a
= 1 }; /* { dg-bogus "(missing|near) init" } */
33 union u U0
= { 1 }; /* { dg-warning "initialization of union" } */
34 union u U1
= { .i
= 1 }; /* { dg-bogus "initialization of union" } */
39 { .b
= 3 }, /* { dg-bogus "(missing|near) init" } */
40 { 4 }, /* { dg-warning "initialization of union" } */
41 { .n
= 9 }, /* { dg-bogus "initialization of union" } */
43 }; /* { dg-warning "(missing|near) init" } */