Debian Codegraph @

gcc/testsuite/gcc.dg/noncompile/20050120-1.c

raw
1 /* PR c/18946 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wshadow -std=gnu89" } */
4
5 void bar (void)
6 {
7 {
8 if (foo) /* { dg-error "undeclared|for each" } */
9 foo (); /* { dg-warning "shadows previous" } */
10 }
11 }
12
13 void baz (void)
14 {
15 if (foo) /* { dg-error "undeclared" } */
16 {
17 int foo; /* { dg-warning "shadows previous" } */
18 }
19 }