1 /* Test -Wnested-externs. */
2 /* Origin: Joseph Myers <joseph@codesourcery.com> */
3 /* { dg-do compile } */
4 /* { dg-options "-Wnested-externs" } */
5
6 int a;
7 static int b;
8 extern int c;
9 void f0(void);
10 static void f1(void);
11
12 void
13 g(void)
14 {
15 extern int a; /* { dg-warning "nested extern declaration of 'a'" } */
16 extern int b; /* { dg-warning "nested extern declaration of 'b'" } */
17 extern int c; /* { dg-warning "nested extern declaration of 'c'" } */
18 extern int d; /* { dg-warning "nested extern declaration of 'd'" } */
19 extern void f0(void); /* { dg-warning "nested extern declaration of 'f0'" } */
20 extern void f1(void); /* { dg-warning "nested extern declaration of 'f1'" } */
21 extern void f2(void); /* { dg-warning "nested extern declaration of 'f2'" } */
22 }