www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17304] New: [SPEC] Anonymous symbols, show or ignore in


          Issue ID: 17304
           Summary: [SPEC] Anonymous symbols, show or ignore in demangler?
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

Reduced-ish test:
template map(fun...) if (fun.length >= 1)
    auto map(Range)(Range r)
        return r;

    import std.algorithm.mutation, std.string;
    auto foo(string[] args)
        return args.map!strip;

Emits the function:


Which falls under the following rule twice in the mangling ABI:

    0             // anonymous symbols

Current behaviour when the GNU binutils D demangler sees the 005, by mostly
fluke, strtol() returns the number 5, which means the two anonymous symbols are

This seems to also be the case in the compiler also, as it doesn't should the
internal symbol when compiling with `-v'.

However, should this be assumed the correct way to handle this symbol?  If so
I'll make it explicit.

Otherwise the alternative would be to demangle the symbol as

Apr 07 2017