]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.c++/anon-union.cc
Initial creation of sourceware repository
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.c++ / anon-union.cc
1
2 struct Foo {
3 union {
4 int zero;
5 unsigned int one;
6 } num1;
7
8 union {
9 int pebble;
10 struct {
11 int rock;
12 unsigned int rock2;
13 } x;
14 union {
15 int qux;
16 unsigned int mux;
17 };
18 unsigned int boulder;
19 };
20 union {
21 int paper;
22 unsigned int cloth;
23 };
24 union {
25 int two;
26 unsigned int three;
27 } num2;
28 };
29
30 union Bar {
31 int x;
32 unsigned int y;
33 };
34
35 Foo foo;
36 Bar bar;
37
38 int main()
39 {
40 foo.paper = 33;
41 foo.pebble = 44;
42 foo.mux = 55;
43
44 bar.x = 33;
45
46 union
47 {
48 int z;
49 unsigned int w;
50 };
51
52 w = 45;
53
54 }