Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/warn/Wswitch-unreachable-1.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do compile } |
2 | |
3 extern int j; | |
4 | |
5 void | |
6 f (int i) | |
7 { | |
8 switch (i) // { dg-warning "statement will never be executed" } | |
9 { | |
10 try | |
11 { | |
12 } | |
13 catch (...) | |
14 { | |
15 } | |
16 case 1:; | |
17 } | |
18 } | |
19 | |
20 void | |
21 g (int i) | |
22 { | |
23 switch (i) | |
24 { | |
25 try | |
26 { | |
27 j = 42; // { dg-warning "statement will never be executed" } | |
28 } | |
29 catch (...) | |
30 { | |
31 } | |
32 case 1:; | |
33 } | |
34 } |