Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / gen-attrs-68.C
blob6bede0659db584aac18e0fea59c2fa0fdae47591
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))) { }
10 struct S1 {
11   S1([[maybe_unused]] int a) { }
14 struct S2 {
15   S2([[maybe_unused]] int f, [[maybe_unused]] int a) { }
18 struct S3 {
19   S3(int a [[maybe_unused]]) { }
22 struct S4 {
23   S4(int f [[maybe_unused]], int a [[maybe_unused]]) { }
26 struct S5 {
27   S5(__attribute__((unused)) int a) { }
30 struct S6 {
31   S6(__attribute__((unused)) int f, __attribute__((unused)) int a) { }
34 struct S7 {
35   S7(int a __attribute__((unused))) { }
38 struct S8 {
39   S8(int f __attribute__((unused)), int a __attribute__((unused))) { }