diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C b/gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C new file mode 100644 index 000000000..f46b8e534 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C @@ -0,0 +1,20 @@ +// Contributed by Dodji Seketeli <dodji@redhat.com> +// Origin: PR c++/39637 +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +template<class... Types> +void +f(Types...) +{ + enum {e = sizeof(Types)}; // { dg-error "parameter packs not expanded with '...'" } + enum {e1 = sizeof...(Types)}; +} + +int +main() +{ + f(0); +} + +// { dg-message "note" "Types" { target *-*-* } 10 } |