libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / c23-attr-maybe_unused-4.c
blob3a2a24888fe122c8faec4a0e3dc9eb7232af60df
1 /* Test C23 maybe_unused attribute: duplicates (allowed after N2557). */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c23 -pedantic-errors" } */
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 } */
11 [[maybe_unused]] [[maybe_unused]] int d [[maybe_unused]] [[maybe_unused]];