1 // PR c++/81429 - wrong parsing of constructor with C++11 attribute.
2 // { dg-do compile { target c++11 } }
3 // { dg-additional-options "-Wunused-parameter -Wno-pedantic" }
5 void fn1([[maybe_unused]] int a) { }
6 void fn2(int a [[maybe_unused]]) { }
7 void fn3(__attribute__((unused)) int a) { }
8 void fn4(int a __attribute__((unused))) { }
11 S1([[maybe_unused]] int a) { }
15 S2([[maybe_unused]] int f, [[maybe_unused]] int a) { }
19 S3(int a [[maybe_unused]]) { }
23 S4(int f [[maybe_unused]], int a [[maybe_unused]]) { }
27 S5(__attribute__((unused)) int a) { }
31 S6(__attribute__((unused)) int f, __attribute__((unused)) int a) { }
35 S7(int a __attribute__((unused))) { }
39 S8(int f __attribute__((unused)), int a __attribute__((unused))) { }