[Issue 5967] New: Mangling of ArgClose for variadic function is swapped
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 9 02:12:37 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5967
Summary: Mangling of ArgClose for variadic function is swapped
Product: D
Version: D1 & D2
Platform: All
URL: http://digitalmars.com/d/2.0/abi.html
OS/Version: All
Status: NEW
Keywords: spec
Severity: trivial
Priority: P2
Component: websites
AssignedTo: nobody at puremagic.com
ReportedBy: kennytm at gmail.com
--- Comment #0 from kennytm at gmail.com 2011-05-09 02:08:28 PDT ---
The spec says:
ArgClose
X // variadic T t,...) style
Y // variadic T t...) style
Z // not variadic
But in reality:
------------------------------------
void ff(int x, ...) {}
void gg(int[] x ...) {}
void main() {
assert( (&ff).mangleof == "PFiYv" ); // passes
assert( (&gg).mangleof == "PFAiXv" ); // passes
}
------------------------------------
This shows X and Y are swapped. The fixed rule should be:
ArgClose
X // variadic T t...) style
Y // variadic T t,...) style
Z // not variadic
(The current core.demangle which follows this wrong ABI documentation generates
the wrong output.)
--
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