From caa99b158b910307533356f457155e59d8686599 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 7 Dec 1998 12:27:47 +0000 Subject: * decl.c (build_typename_type): Set DECL_ARTIFICIAL. * error.c (dump_simple_decl): Also print namespace context. (dump_function_decl): Likewise. * decl2.c (ambiguous_decl): Don't print old value if it's error_mark_node. * decl.c (lookup_name_real): Fix handling of local types shadowed by a non-type decl. Remove obsolete code. * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro. Fixes g++.other/lookup6.C * lang-options.h: Add -fpermissive. * decl2.c: Likewise. * cp-tree.h: Add flag_permissive. * decl.c (init_decl_processing): If neither -fpermissive or -pedantic were specified, set flag_pedantic_errors. * call.c (build_over_call): Turn dropped qualifier messages back into pedwarns. * cvt.c (convert_to_reference): Likewise. * typeck.c (convert_for_assignment): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24150 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/error.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gcc/cp/error.c') diff --git a/gcc/cp/error.c b/gcc/cp/error.c index c3ec3b52fa7..fba5005b5df 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -679,10 +679,10 @@ dump_simple_decl (t, type, v) dump_type_prefix (type, v, 0); OB_PUTC (' '); } - if (DECL_CLASS_SCOPE_P (t)) + if (CP_DECL_CONTEXT (t) != global_namespace) { - dump_type (DECL_CONTEXT (t), 0); - OB_PUTC2 (':', ':'); + dump_decl (DECL_CONTEXT (t), 0); + OB_PUTC2 (':',':'); } if (DECL_NAME (t)) dump_decl (DECL_NAME (t), v); @@ -965,7 +965,7 @@ dump_function_decl (t, v) parmtypes = TYPE_ARG_TYPES (fntype); /* Friends have DECL_CLASS_CONTEXT set, but not DECL_CONTEXT. */ - if (DECL_CONTEXT (t)) + if (DECL_CLASS_SCOPE_P (t)) cname = DECL_CLASS_CONTEXT (t); /* this is for partially instantiated template methods */ else if (TREE_CODE (fntype) == METHOD_TYPE) @@ -997,6 +997,11 @@ dump_function_decl (t, v) /* Skip past "in_charge" identifier. */ parmtypes = TREE_CHAIN (parmtypes); } + else if (CP_DECL_CONTEXT (t) != global_namespace) + { + dump_decl (DECL_CONTEXT (t), 0); + OB_PUTC2 (':',':'); + } if (DESTRUCTOR_NAME_P (name) && DECL_LANGUAGE (t) == lang_cplusplus) parmtypes = TREE_CHAIN (parmtypes); -- cgit v1.2.3