re PR c++/35243 (ICE with invalid initializer list in variadic template)

/cp
2008-05-29  Paolo Carlini  <paolo.carlini@oracle.com>

        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  <paolo.carlini@oracle.com>

        PR c++/35243
        * g++.dg/cpp0x/vt-35243.C: New.

From-SVN: r136174
This commit is contained in:
Paolo Carlini 2008-05-29 16:44:29 +00:00 committed by Paolo Carlini
parent f2f5443c88
commit aecaad790a
4 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
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 <matz@suse.de>
PR c++/27975

View File

@ -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. */

View File

@ -1,3 +1,8 @@
2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35243
* g++.dg/cpp0x/vt-35243.C: New.
2008-05-29 H.J. Lu <hongjiu.lu@intel.com>
PR target/35771

View File

@ -0,0 +1,9 @@
// { dg-options "-std=c++0x" }
struct A {};
template<typename... T> struct B : T...
{
B() : T(x)... {} // { dg-error "not declared" }
};
B<A> b;