aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2009-08-04 12:26:01 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2009-08-04 14:26:01 +0200
commitb96fe38e469c9622c96f2e62b1db2590a2248338 (patch)
tree088aa82c28896fc79a7a0abaca366d5feae99f66 /gcc/cp/error.c
parent567ef7490fbb1b2004dc99327e6190877717b844 (diff)
downloadgcc-b96fe38e469c9622c96f2e62b1db2590a2248338.zip
gcc-b96fe38e469c9622c96f2e62b1db2590a2248338.tar.gz
gcc-b96fe38e469c9622c96f2e62b1db2590a2248338.tar.bz2
re PR debug/39706 (namespaces represented incorrectly in debug_pubnames)
2009-08-04 Dodji Seketeli <dodji@redhat.com> gcc/cp/ChangeLog: PR debug/39706 * error.c (lang_decl_name): Print qualified names for decls in namespace scope. gcc/testsuite/ChangeLog: PR debug/39706 * g++.dg/debug/dwarf2/pubnames-1.C: New test. From-SVN: r150452
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 25a0580..239ff9a 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -2331,7 +2331,10 @@ lang_decl_name (tree decl, int v, bool translate)
reinit_cxx_pp ();
pp_translate_identifiers (cxx_pp) = translate;
- if (v == 1 && DECL_CLASS_SCOPE_P (decl))
+ if (v == 1
+ && (DECL_CLASS_SCOPE_P (decl)
+ || (DECL_NAMESPACE_SCOPE_P (decl)
+ && CP_DECL_CONTEXT (decl) != global_namespace)))
{
dump_type (CP_DECL_CONTEXT (decl), TFF_PLAIN_IDENTIFIER);
pp_cxx_colon_colon (cxx_pp);