From: Paolo Carlini Date: Thu, 29 May 2008 16:44:29 +0000 (+0000) Subject: re PR c++/35243 (ICE with invalid initializer list in variadic template) X-Git-Tag: releases/gcc-4.4.0~4498 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aecaad790a1111a2ad87aa03ed385981dbab7564;p=thirdparty%2Fgcc.git re PR c++/35243 (ICE with invalid initializer list in variadic template) /cp 2008-05-29 Paolo Carlini PR c++/35243 * pt.c (tsubst_initializer_list): Consistently check the tree returned by tsubst_pack_expansion for error_mark_node. /testsuite 2008-05-29 Paolo Carlini PR c++/35243 * g++.dg/cpp0x/vt-35243.C: New. From-SVN: r136174 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f371d8ca0c3a..f9b197144dc4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2008-05-29 Paolo Carlini + + PR c++/35243 + * pt.c (tsubst_initializer_list): Consistently check the tree + returned by tsubst_pack_expansion for error_mark_node. + 2008-05-27 Michael Matz PR c++/27975 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index b13573ce43ce..95440c980230 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -15326,6 +15326,8 @@ tsubst_initializer_list (tree t, tree argvec) = tsubst_pack_expansion (expr, argvec, tf_warning_or_error, NULL_TREE); + if (expanded_exprs == error_mark_node) + continue; /* Prepend each of the expanded expressions to the corresponding TREE_LIST in EXPANDED_ARGUMENTS. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9df869d1709f..bc5c61433abc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-05-29 Paolo Carlini + + PR c++/35243 + * g++.dg/cpp0x/vt-35243.C: New. + 2008-05-29 H.J. Lu PR target/35771 diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35243.C b/gcc/testsuite/g++.dg/cpp0x/vt-35243.C new file mode 100644 index 000000000000..4b5557442690 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/vt-35243.C @@ -0,0 +1,9 @@ +// { dg-options "-std=c++0x" } +struct A {}; + +template struct B : T... +{ + B() : T(x)... {} // { dg-error "not declared" } +}; + +B b;