gcc/testsuite/gcc.dg/declspec-14.c
raw| 1 | /* Test that "typeof(struct foo)" and similar as declaration |
| 2 | specifiers act like typedef. */ |
| 3 | /* Origin: Joseph Myers <[email protected]> */ |
| 4 | /* { dg-do compile } */ |
| 5 | /* { dg-options "" } */ |
| 6 | |
| 7 | typeof(struct foo); /* { dg-warning "useless type name in empty declaration" } */ |
| 8 | |
| 9 | struct bar { int a; } x; |
| 10 | |
| 11 | typeof(x); /* { dg-warning "useless type name in empty declaration" } */ |