1 /* Test declaration specifiers. Test diagnosis of storage class
2 specifiers not at start. */
3 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
4 /* { dg-do compile } */
5 /* { dg-options "-Wold-style-declaration" } */
8 int static x1
; /* { dg-warning "not at beginning" } */
11 int extern x3
; /* { dg-warning "not at beginning" } */
14 int typedef x5
; /* { dg-warning "not at beginning" } */
22 int auto x7
= 0; /* { dg-warning "not at beginning" } */
24 int register x9
= 0; /* { dg-warning "not at beginning" } */
25 g (x6
+ x7
+ x8
+ x9
);
28 const static int x10
; /* { dg-warning "not at beginning" } */
30 /* Attributes are OK before storage class specifiers, since some
31 attributes are like such specifiers themselves. */
33 __attribute__((format(printf
, 1, 2))) static void h (const char *, ...);
34 __attribute__((format(printf
, 1, 2))) void static i (const char *, ...); /* { dg-warning "not at beginning" } */