repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wswitch-unreachable-1.C
blob
99d9a8332177701cf41b18277eda171984db4d99
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
}