diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/pr31434.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/pr31434.C | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31434.C b/gcc/testsuite/g++.dg/cpp0x/pr31434.C new file mode 100644 index 000000000..97ad079ab --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr31434.C @@ -0,0 +1,12 @@ +// { dg-options "-std=gnu++0x" } +template<typename... T> int foo(const T&) // { dg-error "not expanded with|T" } +{ + union { T t; }; // { dg-error "not expanded with|T" } + return t; +} + +void bar() +{ + foo(0); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 10 } +} |