]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
authorJason Merrill <jason@redhat.com>
Sat, 14 Jan 2006 00:47:48 +0000 (19:47 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 14 Jan 2006 00:47:48 +0000 (19:47 -0500)
From-SVN: r109693

gcc/cp/ChangeLog
gcc/cp/pt.c

index ac1e073186ec7845f1050ba622f58138e6e57eea..8c5a33c70439bd4cf9c50d82df58d4964e03be8b 100644 (file)
@@ -1,5 +1,7 @@
 2006-01-13  Jason Merrill  <jason@redhat.com>
 
+       * 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.
 
index b828f569a12873e364731cb9735422155f21e43f..23c84cde0daad73546bd0b83b02819770c28247a 100644 (file)
@@ -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);