Debian Codegraph @

gcc/testsuite/g++.dg/ext/attrib61.C

raw
1 // PR c++/92438
2 // { dg-do compile }
3
4 typedef struct S { int x; } T;
5 T (foo) (T x);
6 T __attribute__((unused)) bar (T x);
7 struct S (__attribute__((unused)) baz) (T x);
8 T (__attribute__((unused)) qux) (T x);
9
10 struct U
11 {
12 U (__attribute__((unused)) int);
13 U (__attribute__((unused)) corge) (int);
14 };
15
16 void
17 test ()
18 {
19 T a, b;
20 a = foo (b);
21 b = bar (a);
22 a = baz (b);
23 b = qux (a);
24 U u (5);
25 U v = u.corge (3);
26 }