This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Pubnames Patch] Anonymous namespaces enclosed in named namespaces. (issue6343052)

On Sun, Aug 12, 2012 at 12:46 PM, Jack Howarth <> wrote:
> On Sun, Jul 01, 2012 at 09:33:06AM -0500, Gabriel Dos Reis wrote:
>> On Thu, Jun 28, 2012 at 12:50 PM, Sterling Augustine
>> <> wrote:
>> > The enclosed patch adds a fix for the pubnames anonymous namespaces contained
>> > within named namespaces, and adds an extensive test for the various pubnames.
>> >
>> > The bug is that when printing at verbosity level 1, and lang_decl_name sees a
>> > namespace decl in not in the global namespace, it prints the namespace's
>> > enclosing scopes--so far so good. However, the code I added earlier this month
>> > to handle anonymous namespaces also prints the enclosing scopes, so one would
>> > get foo::foo::(anonymous namespace) instead of foo::(anonymous namespace).
>> >
>> > The solution is to stop the added code from printing the enclosing scope, which
>> > is correct for both verbosity levels 0 and 1. Level 2 is handled elsewhere and
>> > so not relevant.
>> >
>> > I have formalized the tests I have been using to be sure pubnames are correct
>> > and include that in this patch. It is based on ccoutant's from
>> > the gold test suite.
>> >
>> > OK for mainline?
>> OK.
> This patch introduces the regressions...
> FAIL: g++.dg/debug/dwarf2/pubnames-2.C scan-assembler .section\t.debug_pubnames
> FAIL: g++.dg/debug/dwarf2/pubnames-2.C scan-assembler
> "_GLOBAL__sub_I__ZN3one3c1vE\\\\0"+[ \t]+[#;]+[ \t]+external name
> FAIL: g++.dg/debug/dwarf2/pubnames-2.C scan-assembler .section\t.debug_pubtypes
> at -m32/-m64 on x86_64-apple-darwin12...
> I have attached the -m32 assembly generated for the g++.dg/debug/dwarf2/pubnames-2.C
> to PR54230 but haven't been able to add Sterling to the PR as none of his email
> addresses are recognized by bugzilla.
>          Jack

The enclosed patch adjusts the test so it will pass on darwin. The
issue was that it looked for some elf-specific assembly directives,
which it shouldn't.

OK for mainline?


2012-08-13  Sterling Augustine  <>

	* g++.dg/debug/dwarf2/pubnames-2.C: Adjust.

Attachment: darwin.patch
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]