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