From 0aa5b426a9e86d6dfdfdba6934f08c1be55d564d Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Sun, 30 Aug 1998 17:45:15 +0000 Subject: error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when comparing with global_namespace. * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when comparing with global_namespace. (dump_aggr_type): Likewise. From-SVN: r22105 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/error.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 359516b..cba78ab 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 1998-08-30 Mark Mitchell + * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when + comparing with global_namespace. + (dump_aggr_type): Likewise. + * decl.c (grokfndecl): Issue error on declaration of friend templates with explicit template arguments. diff --git a/gcc/cp/error.c b/gcc/cp/error.c index bd459c2..dd3f952 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -352,7 +352,7 @@ dump_aggr_type (t, v, canonical_name) name = TYPE_NAME (canonical_name ? TYPE_MAIN_VARIANT (t) : t); - if (name && DECL_CONTEXT (name) && DECL_CONTEXT (name) != global_namespace) + if (name && CP_DECL_CONTEXT (name) != global_namespace) { /* FUNCTION_DECL or RECORD_TYPE */ dump_decl (DECL_CONTEXT (name), 0); @@ -728,7 +728,7 @@ dump_decl (t, v) break; case NAMESPACE_DECL: - if (DECL_CONTEXT (t) != global_namespace) + if (CP_DECL_CONTEXT (t) != global_namespace) { dump_decl (DECL_CONTEXT (t), v); OB_PUTC2 (':',':'); -- cgit v1.1