diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/other/anon-union3.C')
-rw-r--r-- | gcc/testsuite/g++.dg/other/anon-union3.C | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/anon-union3.C b/gcc/testsuite/g++.dg/other/anon-union3.C new file mode 100644 index 0000000000..94d0aecaf0 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/anon-union3.C @@ -0,0 +1,25 @@ +// PR c++/32054 + +class C +{ + auto union // { dg-error "storage class" "" { target { ! c++11 } } } + { + int a; + }; // { dg-error "multiple|specified" "" { target c++11 } } + register union // { dg-error "storage class" } + { + int b; + }; + static union // { dg-error "storage class" } + { + int c; + }; + extern union // { dg-error "storage class" } + { + int d; + }; + mutable union // { dg-error "storage class" } + { + int e; + }; +}; |