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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150452
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-08-04 Dodji Seketeli <dodji@redhat.com>
+
+ PR debug/39706
+ * error.c (lang_decl_name): Print qualified names for decls
+ in namespace scope.
+
2009-08-03 Jason Merrill <jason@redhat.com>
Jakub Jelinek <jakub@redhat.com>
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);
+2009-08-04 Dodji Seketeli <dodji@redhat.com>
+
+ PR debug/39706
+ * g++.dg/debug/dwarf2/pubnames-1.C: New test.
+
2009-08-03 Jason Merrill <jason@redhat.com>
Jakub Jelinek <jakub@redhat.com>
--- /dev/null
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR debug/39706
+// { dg-options "-g -dA" }
+// { dg-do compile }
+// { dg-final { scan-assembler-times ".debug_pubnames" 1 } }
+// { dg-final { scan-assembler-times "\"main\".*external name" 1 } }
+// { dg-final { scan-assembler-times "\"ns::ns_x.*external name" 1 } }
+// { dg-final { scan-assembler-times "\"y::y_x.*external name" 1 } }
+
+namespace ns { int ns_x; }
+class y { public: static int y_x; };
+int y::y_x;
+int main() { return ns::ns_x; }