1 /* Test declaration specifiers.  Test checks on storage class
2    specifiers that can be made at parse time rather than for each
3    declarator.  Note that __thread is tested in
4    gcc.dg/tls/diag-*.c.  */
5 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
6 /* { dg-do compile } */
7 /* { dg-options "-fgnu89-inline" } */
8 
9 /* Duplicate specifiers.  */
10 
11 inline inline void f0 (void),
12   f1 (void);
13 
14 static static int a, /* { dg-error "duplicate 'static'" } */
15   b;
16 
17 extern extern int c, /* { dg-error "duplicate 'extern'" } */
18   d;
19 
20 typedef typedef int e, /* { dg-error "duplicate 'typedef'" } */
21   f;
22 
23 void
h(void)24 h (void)
25 {
26   auto auto int p, /* { dg-error "duplicate 'auto'" } */
27     q;
28 
29   register register int r, /* { dg-error "duplicate 'register'" } */
30     s;
31 }
32 
33 /* Multiple specifiers.  */
34 
35 static extern int x, /* { dg-error "multiple storage classes in declaration specifiers" } */
36   y;
37 
38 extern typedef long z, /* { dg-error "multiple storage classes in declaration specifiers" } */
39   w;
40