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
Daily bump.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wimplicit-fallthrough-1.C
blob
b5ebd3daaad914f9b18738dc1d5f5a5f4e44ab5f
1
// PR c++/77803
2
// { dg-do compile { target c++11 } }
3
// { dg-options "-Wimplicit-fallthrough" }
4
5
struct A {};
6
int a;
7
8
void
9
fn1 ()
10
{
11
switch (0) {
12
case 0:
13
{
14
A b;
15
[[fallthrough]];
16
}
17
default:
18
a = 0;
19
}
20
}
21
22
void
23
fn2 ()
24
{
25
switch (0) {
26
case 0:
27
{
28
A b;
29
} // { dg-warning "statement may fall through" }
30
default:
31
a = 0;
32
}
33
}