aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-05-12 21:42:34 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-05-12 17:42:34 -0400
commit6eb3bb273d41fc53006e8c0c042433d41bdcb294 (patch)
tree92a30e7ea61540479bbab87c4470f8b7d7a37d52 /gcc/cp/error.c
parentb706d7f20d438d0cda4790a798d98d5cb74290f9 (diff)
downloadgcc-6eb3bb273d41fc53006e8c0c042433d41bdcb294.zip
gcc-6eb3bb273d41fc53006e8c0c042433d41bdcb294.tar.gz
gcc-6eb3bb273d41fc53006e8c0c042433d41bdcb294.tar.bz2
error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or DECL_NAMESPACE_SCOPE_P.
* error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or DECL_NAMESPACE_SCOPE_P. (lang_decl_name): Likewise. * pt.c (tsubst_friend_function, tsubst): Likewise. * decl.c (pushdecl, redeclaration_error_message, start_decl, cp_finish_decl, start_function): Likewise. * class.c (finish_struct_1): Likewise. * call.c (build_over_call): Likewise. (compare_ics): Use DERIVED_FROM_P. From-SVN: r19705
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 1f068da..6173921 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -658,9 +658,7 @@ dump_simple_decl (t, type, v)
OB_PUTC (' ');
dump_readonly_or_volatile (t, after);
}
- /* DECL_CLASS_CONTEXT isn't being set in some cases. Hmm... */
- if (DECL_CONTEXT (t)
- && TREE_CODE_CLASS (TREE_CODE (DECL_CONTEXT (t))) == 't')
+ if (DECL_CLASS_SCOPE_P (t))
{
dump_type (DECL_CONTEXT (t), 0);
OB_PUTC2 (':', ':');
@@ -1748,8 +1746,7 @@ lang_decl_name (decl, v)
OB_INIT ();
- if (v == 1 && DECL_CONTEXT (decl)
- && TREE_CODE_CLASS (TREE_CODE (DECL_CONTEXT (decl))) == 't')
+ if (v == 1 && DECL_CLASS_SCOPE_P (decl))
{
tree cname;
if (TREE_CODE (decl) == FUNCTION_DECL)