(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
c2x-attr-nodiscard-3.c
       1  /* Test C2x nodiscard attribute: invalid syntax.  */
       2  /* { dg-do compile } */
       3  /* { dg-options "-std=c2x -pedantic-errors" } */
       4  
       5  [[nodiscard()]] int a (void); /* { dg-error "parentheses must be omitted if attribute argument list is empty" } */
       6  
       7  [[nodiscard(0)]] int b (void); /* { dg-error "expected" } */
       8  
       9  [[nodiscard("", 123)]] int c (void); /* { dg-error "expected" } */
      10  
      11  [[nodiscard((""))]] int d (void); /* { dg-error "expected" } */