Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / c23-attr-maybe_unused-3.c
blobfe5d61aed7b20e2e177cba2f8b23fe8a84942ea3
1 /* Test C23 maybe_unused attribute: invalid syntax. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c23 -pedantic-errors" } */
5 [[maybe_unused()]] int a; /* { dg-error "does not take any arguments" } */
7 [[maybe_unused(0)]] int b; /* { dg-error "does not take any arguments|expected" } */
9 [[maybe_unused("", 123)]] int c; /* { dg-error "does not take any arguments|expected" } */
11 [[maybe_unused("")]] int d; /* { dg-error "does not take any arguments|expected" } */