From: Jason Merrill Date: Fri, 13 Jan 2006 19:08:19 +0000 (-0500) Subject: name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT. X-Git-Tag: releases/gcc-4.2.0~4887 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08d295c564c3093d18a4716e0a75a073b37f9123;p=thirdparty%2Fgcc.git name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT. * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT. * pt.c (check_explicit_specialization): Likewise. From-SVN: r109672 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 458c3c786a07..ac1e073186ec 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 96ce4a76849d..2d204a76c844 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 3afe45d2a4ed..b828f569a128 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); } }