gcc/testsuite/gcc.dg/c23-attr-maybe_unused-4.c
raw| 1 | /* Test C23 maybe_unused attribute: duplicates (allowed after N2557). */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-std=c23 -pedantic-errors" } */ |
| 4 | |
| 5 | [[maybe_unused, __maybe_unused__]] int a; |
| 6 | [[__maybe_unused__, maybe_unused]] int b; |
| 7 | int c [[maybe_unused, maybe_unused]]; |
| 8 | [[maybe_unused, maybe_unused]]; |
| 9 | /* { dg-error "ignored" "ignored" { target *-*-* } .-1 } */ |
| 10 | |
| 11 | [[maybe_unused]] [[maybe_unused]] int d [[maybe_unused]] [[maybe_unused]]; |