PR other/25028
[official-gcc.git] / gcc / testsuite / gcc.dg / declspec-14.c
bloba19b9de37713166568edf2f82dc0c4b4320b2604
1 /* Test that "typeof(struct foo)" and similar as declaration
2 specifiers act like typedef. */
3 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
4 /* { dg-do compile } */
5 /* { dg-options "" } */
7 typeof(struct foo); /* { dg-warning "warning: useless type name in empty declaration" } */
9 struct bar { int a; } x;
11 typeof(x); /* { dg-warning "warning: useless type name in empty declaration" } */