Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/diagnostic/redeclaration-1.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 void | |
2 foo (int i) | |
3 { | |
4 int i // { dg-error "7:declaration of .int i. shadows a parameter" } | |
5 (0); | |
6 | |
7 for (int j ;;) // { dg-message "12:.int j. previously declared here" } | |
8 int j // { dg-error "9:redeclaration of .int j." } | |
9 (0); | |
10 } | |
11 | |
12 void | |
13 bar (int i) // { dg-message "10:.int i. previously declared here" } | |
14 try | |
15 { } | |
16 catch (...) | |
17 { | |
18 int i // { dg-error "11:redeclaration of .int i." } | |
19 (0); | |
20 } |