aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2006-01-13 14:08:19 -0500
committerJason Merrill <jason@gcc.gnu.org>2006-01-13 14:08:19 -0500
commit08d295c564c3093d18a4716e0a75a073b37f9123 (patch)
tree1d45868e96f6da416d60b73c30aeb8faf63de6af
parent4d9cab74fa2975564fae86f0062ceeaeb3b5b954 (diff)
downloadgcc-08d295c564c3093d18a4716e0a75a073b37f9123.zip
gcc-08d295c564c3093d18a4716e0a75a073b37f9123.tar.gz
gcc-08d295c564c3093d18a4716e0a75a073b37f9123.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/name-lookup.c2
-rw-r--r--gcc/cp/pt.c6
3 files changed, 10 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 458c3c7..ac1e073 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 96ce4a7..2d204a7 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 3afe45d..b828f56 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);
}
}