gcc/
[official-gcc.git] / gcc / testsuite / gcc.dg / Wshadow-4.c
blobf3b986fa6035ffbcd04ffe007f1bdb460680ed4c
1 /* { dg-do compile } */
2 /* { dg-options "-Wshadow -Wsystem-headers" } */
4 #include "Wshadow-4.h"
5 extern void index2 (void); /* { dg-message "declaration is here" } */
7 void foo (double index1,
8 double index2)
12 void foo1 (void)
14 double index1;
15 double index2;
18 void foo2 (void)
21 double index1;
22 double index2;
26 void foo3 (void)
28 void (*index1)(void); /* { dg-warning "shadows" } */
29 void (*index2)(void); /* { dg-warning "shadows" } */
32 void foo4 (void)
34 void index1(void) {}; /* { dg-warning "shadows" } */
35 void index2(void) {}; /* { dg-warning "shadows" } */
38 /* { dg-message "declaration is here" "" { target *-*-* } 0 } */