Bug 5967 – Mangling of ArgClose for variadic function is swapped
Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-05-09T02:08:00Z
Last change time
2015-06-09T05:10:46Z
Keywords
spec
Assigned to
nobody
Creator
kennytm
Comments
Comment #0 by kennytm — 2011-05-09T02:08:28Z
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.)