]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/c2x-attr-maybe_unused-3.c
1 /* Test C2x maybe_unused attribute: invalid syntax. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c2x -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" } */