Handle void * conversions in FreeBSD/x86 native code to fix C++ build.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cp / anon-union.cc
CommitLineData
c906108c
SS
1
2struct Foo {
3 union {
4 int zero;
5 unsigned int one;
6 } num1;
a0b3c4fd 7 struct X {
c906108c
SS
8 int rock;
9 unsigned int rock2;
a0b3c4fd
JM
10 };
11 union {
12 int pebble;
13 X x;
c906108c
SS
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
30union Bar {
31 int x;
32 unsigned int y;
33};
34
c906108c
SS
35
36int main()
37{
a0b3c4fd
JM
38 Foo foo = {0, 0};
39
c906108c
SS
40 foo.paper = 33;
41 foo.pebble = 44;
42 foo.mux = 55;
43
a0b3c4fd 44 Bar bar = {0};
c906108c 45
a0b3c4fd 46 union {
c906108c
SS
47 int z;
48 unsigned int w;
a0b3c4fd
JM
49 }; w = 0;
50
51 bar.x = 33;
c906108c
SS
52
53 w = 45;
54
e1c2defa 55 int j = 0;
c906108c 56}
This page took 2.395958 seconds and 4 git commands to generate.