name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
authorJason Merrill <jason@redhat.com>
Fri, 13 Jan 2006 19:08:19 +0000 (14:08 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 13 Jan 2006 19:08:19 +0000 (14:08 -0500)
        * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
        * pt.c (check_explicit_specialization): Likewise.

From-SVN: r109672

gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/cp/pt.c

index 458c3c786a07187058e8d256c5a9635b9ebce0cb..ac1e073186ec7845f1050ba622f58138e6e57eea 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-13  Jason Merrill  <jason@redhat.com>
+
+       * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
+       * pt.c (check_explicit_specialization): Likewise.
+
 2006-01-12  Jason Merrill  <jason@redhat.com>
 
        PR libstdc++/24660
index 96ce4a76849d7dcd920a3ab10789d1f27ac00ce0..2d204a76c844c04390a90e9dfad6de2a04ea1b45 100644 (file)
@@ -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)
index 3afe45d2a4ed8797f7d7c53d56d153c8e41791f4..b828f569a12873e364731cb9735422155f21e43f 100644 (file)
@@ -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);
                }
            }