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