Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/noncompile/20050120-1.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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 } |