Corrected date in changelog
[official-gcc.git] / gcc / testsuite / gcc.dg / declspec-1.c
bloba75df907729ce20d6e5162f0346cf84d24ae4036
1 /* Test declaration specifiers. Test cases that used to be handled in
2 a loop in grokdeclarator. */
3 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
4 /* { dg-do compile } */
5 /* { dg-options "-std=gnu89" } */
7 typedef int t;
9 /* These should all be diagnosed, but only once, not for every
10 identifier declared. */
11 struct s0 int x0, /* { dg-error "two or more data types" } */
12 /* { dg-error "storage size of 'x0' isn't known" "" { target *-*-* } .-1 } */
13 x1; /* { dg-error "storage size of 'x1' isn't known" } */
15 char union u0 x2, /* { dg-error "two or more data types" } */
16 x3;
18 enum e0 struct s1 x4, /* { dg-error "two or more data types" } */
19 /* { dg-error "storage size of 'x4' isn't known" "" { target *-*-* } .-1 } */
20 x5; /* { dg-error "storage size of 'x5' isn't known" } */
22 short short x6, /* { dg-error "duplicate" } */
23 x7;
25 t int x8, /* { dg-error "two or more data types" } */
26 x9;
28 long long long x10, /* { dg-error "long long long" } */
29 x11;