summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/declspec-14.c
blob: d8ec78c9cebc368f5af576693d17eecbf801d308 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* Test that "typeof(struct foo)" and similar as declaration
   specifiers act like typedef.  */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* { dg-options "" } */

typeof(struct foo); /* { dg-warning "useless type name in empty declaration" } */

struct bar { int a; } x;

typeof(x); /* { dg-warning "useless type name in empty declaration" } */