Debian Codegraph @

gcc/testsuite/gcc.dg/c23-attr-deprecated-4.c

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