Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / c23-attr-nodiscard-3.c
blob957383756a8c9ee364df8c31a90879537b6e85ce
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" } */