[Issue 3334] New: std.demangle doesn't parse ref, pure, notrow

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 20 11:11:42 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3334

           Summary: std.demangle doesn't parse ref, pure, notrow
           Product: D
           Version: 2.032
          Platform: All
        OS/Version: Linux
            Status: NEW
          Keywords: patch
          Severity: minor
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: lutger.blijdestijn at gmail.com


--- Comment #0 from Lutger <lutger.blijdestijn at gmail.com> 2009-09-20 11:11:41 PDT ---
There are four 'attributes' defined in the ABI which std.demangle currently
doesn't parse: pure, nothrow, ref and property: 

import std.demangle;

void main()
{
    assert(demangle("_D3fooFNaNbZv") == "pure nothrow void foo()");
}

I've attached a patch (my first), feedback appreciated if something is not
right. 

I didn't know how property is supposed to be demangled, so that one is just
ignored. Also, this patch assumes all attributes are valid for functions and
delegates and just ignores attributes for calling conventions other that D.
Again, not sure if that's ok.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list