]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/c2x-attr-fallthrough-4.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / c2x-attr-fallthrough-4.c
CommitLineData
75ce04fb 1/* Test C2x fallthrough attribute: duplicates (allowed after N2557). */
d5fbe5e0
JM
2/* { dg-do compile } */
3/* { dg-options "-std=c2x -pedantic-errors" } */
4
5int
6f (int a)
7{
8 switch (a)
9 {
10 case 1:
11 a++;
75ce04fb 12 [[fallthrough, __fallthrough__]]; /* { dg-warning "specified multiple times" } */
d5fbe5e0
JM
13 case 2:
14 a++;
d5fbe5e0
JM
15 [[fallthrough]] [[fallthrough]]; /* { dg-warning "specified multiple times" } */
16 case 3:
17 a++;
18 }
19 return a;
20}