]>
Commit | Line | Data |
---|---|---|
75ce04fb | 1 | /* Test C2x fallthrough attribute: duplicates (allowed after N2557). */ |
d5fbe5e0 JM |
2 | /* { dg-do compile } */ |
3 | /* { dg-options "-std=c2x -pedantic-errors" } */ | |
4 | ||
5 | int | |
6 | f (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 | } |