diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/initlist12.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/initlist12.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist12.C b/gcc/testsuite/g++.dg/cpp0x/initlist12.C new file mode 100644 index 000000000..f344c780c --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/initlist12.C @@ -0,0 +1,21 @@ +// PR c++/38698 +// { dg-options "-std=c++0x" } +// { dg-prune-output "note" } + +struct A +{ + int i; +}; + +A a({1,2}); // { dg-error "no match" } + +union U +{ + int i,j; +}; + +U u({1,2}); // { dg-error "no match" } + +union V {}; + +V v({1}); // { dg-error "no match" } |