]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/cpp0x/gen-attrs-67.C
PR c++/83820 - excessive attribute arguments not detected.
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp0x / gen-attrs-67.C
1 // PR c++/83820 - excessive attribute arguments not detected.
2 // { dg-do compile { target c++11 } }
3
4 [[noreturn()]] void f0 (); // { dg-error ".noreturn. attribute does not take any arguments" }
5 [[noreturn(1)]] void f1 (); // { dg-error ".noreturn. attribute does not take any arguments" }
6 [[noreturn(1, 2)]] void f2 (); // { dg-error ".noreturn. attribute does not take any arguments" }
7 [[maybe_unused()]] int f3(); // { dg-error ".maybe_unused. attribute does not take any arguments" }
8 [[nodiscard()]] int f4(); // { dg-error ".nodiscard. attribute does not take any arguments" }
9 [[gnu::noinline()]] int f5(); // { dg-error ".noinline. attribute does not take any arguments" }
10 [[gnu::constructor]] int f6();
11 [[gnu::constructor(101)]] int f7();