From 3a15b281f172790934133c921c9d7c2a095b9ca7 Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 13 Jan 2006 19:08:19 +0000 Subject: [PATCH] * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT. * pt.c (check_explicit_specialization): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109672 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/name-lookup.c | 2 +- gcc/cp/pt.c | 6 ++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 458c3c786a0..ac1e073186e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2006-01-13 Jason Merrill + + * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT. + * pt.c (check_explicit_specialization): Likewise. + 2006-01-12 Jason Merrill PR libstdc++/24660 diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 96ce4a76849..2d204a76c84 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -2878,7 +2878,7 @@ set_decl_namespace (tree decl, tree scope, bool friendp) if (!is_overloaded_fn (old)) goto complain; fn = OVL_CURRENT (old); - if (!is_associated_namespace (scope, DECL_CONTEXT (fn))) + if (!is_associated_namespace (scope, CP_DECL_CONTEXT (fn))) goto complain; /* A template can be explicitly specialized in any namespace. */ if (processing_explicit_instantiation) diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 3afe45d2a4e..b828f569a12 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1911,8 +1911,10 @@ check_explicit_specialization (tree declarator, else { tree fn = OVL_CURRENT (fns); - if (!is_associated_namespace (current_namespace, DECL_CONTEXT (fn))) - error ("%qD is not declared in %qD", decl, current_namespace); + if (!is_associated_namespace (current_namespace, + CP_DECL_CONTEXT (fn))) + error ("%qD is not declared in %qD", + decl, current_namespace); } } -- 2.11.0