gcc/gcc/testsuite/gcc.dg/c2x-attr-nodiscard-4.c

7 lines
242 B
C

/* Test C2x nodiscard attribute: duplicates (allowed after N2557). */
/* { dg-do compile } */
/* { dg-options "-std=c2x -pedantic-errors" } */
[[nodiscard, __nodiscard__]] int f (void);
[[__nodiscard__, nodiscard("message")]] int g (void);