1 /* Test obsolete forms of designated initializers. Test with default
2 warning options: valid forms are accepted, while ".member" without
3 "=" should not be (bug 16667). */
4 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
5 /* { dg-do compile } */
6 /* { dg-options "" } */
8 struct s s0
= { .a
= 1 };
9 struct s s1
= { a
: 1 };
11 int x0
[] = { [0] = 1 };
14 /* Invalid syntax: multiple designators without "=". */
15 int x2
[2][2] = { [0][0] 1 }; /* { dg-error "syntax error|parse error|expected" } */
18 /* Invalid syntax: C99-style structure designator without "=". */
19 struct s s2
= { .a
1 }; /* { dg-error "syntax error|parse error|expected" } */