[Issue 6527] New: Ambiguous mangling of inout parameters
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 18 09:26:17 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6527
Summary: Ambiguous mangling of inout parameters
Product: D
Version: 2.040
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: sean at invisibleduck.org
--- Comment #0 from Sean Kelly <sean at invisibleduck.org> 2011-08-18 09:26:16 PDT ---
An inout(T) function parameter is represented as "NgT" (ie. Wild T, per the
ABI). 'N' is already used as the signifier for a FuncAttr, so this function:
nothrow inout(int) fn(inout(int) x) { return x; }
Is mangled as:
2fnFNbNgiZNgi
Parsing this, I have to explicitly recognize "Ng" as not a FuncAttr but rather
the beginning of an inout parameter type, rewind the parse location (admittedly
by one char) and jump out of the FuncAttr parse loop to deal with it. Couldn't
some other label be used to mark an inout parameter so this conflict doesn't
exist? I guess TypeNewArray might have this same problem ("Ne") except that it
isn't even used in D2 right now so I suppose that's a non-issue.
--
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