]>
Commit | Line | Data |
---|---|---|
54bac0ce | 1 | /* Test C23 fallthrough attribute: duplicates (allowed after N2557). */ |
d5fbe5e0 | 2 | /* { dg-do compile } */ |
54bac0ce | 3 | /* { dg-options "-std=c23 -pedantic-errors" } */ |
d5fbe5e0 JM |
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 | } |