Merge reload-branch up to revision 101000
[official-gcc.git] / gcc / testsuite / g++.dg / parse / attr1.C
blob10d6f57d3a7c7c158fc803071813d4b08aa75e7e
1 // Test whether attributes are accepted both immediately after
2 // struct/union keyword and after the closing brace.
3 // { dg-do compile }
5 struct foo
7   union __attribute__ ((packed))
8   {
9     int a;
10     long b;
11   };
12   union __attribute__ ((packed)) __attribute__ ((unused))
13   {
14     int c;
15     long d;
16   };
19 union __attribute__ ((packed)) bar
21   int c;
22   long d;
25 struct __attribute__ ((packed)) baz
27   int e;
28   long f;
31 struct foo2
33   union
34   {
35     int a;
36     long b;
37   } __attribute__ ((packed));
40 union bar2
42   int c;
43   long d;
44 } __attribute__ ((packed));
46 struct baz2
48   int e;
49   long f;
50 } __attribute__ ((packed));