Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/fallthrough1.C

raw
1 // PR c/7652
2 // { dg-do compile { target c++17 } }
3 // { dg-options "-Wextra -Wall -Wpedantic" }
4
5 // Check that we accept attribute [[fallthrough]].
6
7 extern void bar (int);
8
9 void
10 f (int i)
11 {
12 switch (i)
13 {
14 case 1:
15 bar (1);
16 [[fallthrough]];
17 case 2:
18 bar (2);
19 }
20 }