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