diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/anon7.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/anon7.C | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/anon7.C b/gcc/testsuite/g++.old-deja/g++.other/anon7.C new file mode 100644 index 000000000..ebc378005 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/anon7.C @@ -0,0 +1,24 @@ +// { dg-do assemble } + +struct A { + union { + int a; // { dg-error "" } conflicts with previous declaration + }; + int a; // { dg-error "" } +}; + +struct B { + int b; // { dg-error "" } conflicts with previous declaration + union { + int b; // { dg-error "" } duplicate member + }; +}; + +struct C { + union { + int c; // { dg-error "" } conflicts with previous declaration + }; + union { + int c; // { dg-error "" } duplicate member + }; +}; |