| 1 |
/* Test C23 attribute syntax. Invalid use of fallthrough attribute |
| 2 |
outside switch. */ |
| 3 |
/* { dg-do compile } */ |
| 4 |
/* { dg-options "-std=c23 -pedantic-errors -Wextra" } */ |
| 5 |
|
| 6 |
int |
| 7 |
f (int a) |
| 8 |
{ |
| 9 |
[[fallthrough]]; /* { dg-error "invalid use of attribute 'fallthrough'" } */ |
| 10 |
return a; |
| 11 |
} |