diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-08-02 23:48:37 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-08-02 23:48:37 +0000 |
commit | a0b3c4fd32cf8336bf7b69f373ef86d5c54035f6 (patch) | |
tree | cf8f31bccdd267252e6b3c9636a1d323397673e2 /gdb/testsuite/gdb.c++/anon-union.cc | |
parent | 30727aa6d12fb866494020c0b62ab265a2bdcdfe (diff) | |
download | binutils-a0b3c4fd32cf8336bf7b69f373ef86d5c54035f6.zip binutils-a0b3c4fd32cf8336bf7b69f373ef86d5c54035f6.tar.gz binutils-a0b3c4fd32cf8336bf7b69f373ef86d5c54035f6.tar.bz2 |
import gdb-1999-08-02 snapshot
Diffstat (limited to 'gdb/testsuite/gdb.c++/anon-union.cc')
-rw-r--r-- | gdb/testsuite/gdb.c++/anon-union.cc | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/gdb/testsuite/gdb.c++/anon-union.cc b/gdb/testsuite/gdb.c++/anon-union.cc index c58a306..0b3fd13 100644 --- a/gdb/testsuite/gdb.c++/anon-union.cc +++ b/gdb/testsuite/gdb.c++/anon-union.cc @@ -4,13 +4,13 @@ struct Foo { int zero; unsigned int one; } num1; - - union { - int pebble; - struct { + struct X { int rock; unsigned int rock2; - } x; + }; + union { + int pebble; + X x; union { int qux; unsigned int mux; @@ -32,22 +32,23 @@ union Bar { unsigned int y; }; -Foo foo; -Bar bar; int main() { + Foo foo = {0, 0}; + foo.paper = 33; foo.pebble = 44; foo.mux = 55; - bar.x = 33; + Bar bar = {0}; - union - { + union { int z; unsigned int w; - }; + }; w = 0; + + bar.x = 33; w = 45; |