From a254d1ae8009577f32c8137a4f41a19bff243381 Mon Sep 17 00:00:00 2001 From: jason Date: Sun, 9 Sep 2007 03:28:08 +0000 Subject: [PATCH] PR c++/33342 * pt.c (most_specialized_class): Set processing_template_decl while tsubsting partial spec args. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128285 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/pt.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b5229b3814d..ad342b6e785 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2007-09-08 Jason Merrill + + PR c++/33342 + * pt.c (most_specialized_class): Set processing_template_decl + while tsubsting partial spec args. + 2007-09-06 Jason Merrill * decl2.c (get_guard): Copy visibility from the guarded variable. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index aafb964f3c3..e26958cb7b8 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -13646,6 +13646,8 @@ most_specialized_class (tree type, tree tmpl) { int i; + ++processing_template_decl; + /* Discard the outer levels of args, and then substitute in the template args from the enclosing class. */ partial_spec_args = INNERMOST_TEMPLATE_ARGS (partial_spec_args); @@ -13661,6 +13663,8 @@ most_specialized_class (tree type, tree tmpl) for (i = TREE_VEC_LENGTH (parms) - 1; i >= 0; --i) TREE_VEC_ELT (parms, i) = tsubst (TREE_VEC_ELT (parms, i), outer_args, tf_none, NULL_TREE); + + --processing_template_decl; } spec_args = get_class_bindings (parms, partial_spec_args, -- 2.11.4.GIT