diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4a8b907025da..097f8fab585b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2007-12-02 Paolo Carlini + + PR c++/34061 + * pt.c (current_template_args): Use error_operand_p. + 2007-12-02 Paolo Carlini PR c++/34273 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 4b09e856459a..f70147d613da 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3186,7 +3186,7 @@ current_template_args (void) { t = TREE_VALUE (t); - if (t != error_mark_node) + if (!error_operand_p (t)) { if (TREE_CODE (t) == TYPE_DECL || TREE_CODE (t) == TEMPLATE_DECL) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 00ca04936785..99fea62115ca 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-12-02 Paolo Carlini + + PR c++/34061 + * g++.dg/cpp0x/pr34061.C: New. + 2007-12-02 Paolo Carlini PR c++/34273 diff --git a/gcc/testsuite/g++.dg/cpp0x/pr34061.C b/gcc/testsuite/g++.dg/cpp0x/pr34061.C new file mode 100644 index 000000000000..7d6e71d0e74b --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr34061.C @@ -0,0 +1,5 @@ +// PR c++/34061 +// { dg-do compile } +// { dg-options "-std=c++0x" } + +template class ...T> struct A : T<0> {}; // { dg-error "not expanded|T" }