From: Jason Merrill Date: Sat, 14 Jan 2006 00:47:48 +0000 (-0500) Subject: * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more. X-Git-Tag: releases/gcc-4.2.0~4878 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddf74938594734e6e28d35b0086352894b8beb2d;p=thirdparty%2Fgcc.git * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more. From-SVN: r109693 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ac1e073186ec..8c5a33c70439 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2006-01-13 Jason Merrill + * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more. + * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT. * pt.c (check_explicit_specialization): Likewise. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index b828f569a128..23c84cde0daa 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1901,7 +1901,7 @@ check_explicit_specialization (tree declarator, /* Find the namespace binding, using the declaration context. */ - fns = lookup_qualified_name (current_namespace, dname, + fns = lookup_qualified_name (CP_DECL_CONTEXT (decl), dname, false, true); if (!fns || !is_overloaded_fn (fns)) { @@ -1911,7 +1911,7 @@ check_explicit_specialization (tree declarator, else { tree fn = OVL_CURRENT (fns); - if (!is_associated_namespace (current_namespace, + if (!is_associated_namespace (CP_DECL_CONTEXT (decl), CP_DECL_CONTEXT (fn))) error ("%qD is not declared in %qD", decl, current_namespace);