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" }
4 
fn1(int a)5 void fn1([[maybe_unused]] int a) { }
fn2(int a)6 void fn2(int a [[maybe_unused]]) { }
fn3(int a)7 void fn3(__attribute__((unused)) int a) { }
fn4(int a)8 void fn4(int a __attribute__((unused))) { }
9 
10 struct S1 {
S1S111   S1([[maybe_unused]] int a) { }
12 };
13 
14 struct S2 {
S2S215   S2([[maybe_unused]] int f, [[maybe_unused]] int a) { }
16 };
17 
18 struct S3 {
S3S319   S3(int a [[maybe_unused]]) { }
20 };
21 
22 struct S4 {
S4S423   S4(int f [[maybe_unused]], int a [[maybe_unused]]) { }
24 };
25 
26 struct S5 {
S5S527   S5(__attribute__((unused)) int a) { }
28 };
29 
30 struct S6 {
S6S631   S6(__attribute__((unused)) int f, __attribute__((unused)) int a) { }
32 };
33 
34 struct S7 {
S7S735   S7(int a __attribute__((unused))) { }
36 };
37 
38 struct S8 {
S8S839   S8(int f __attribute__((unused)), int a __attribute__((unused))) { }
40 };
41