Bug 7893 – Spec completely wrong for D variadic arguments on 64 bits
Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-12T07:24:00Z
Last change time
2015-06-09T05:11:41Z
Keywords
spec
Assigned to
nobody
Creator
clugdbug
Comments
Comment #0 by clugdbug — 2012-04-12T07:24:53Z
The spec talks about
"argptr, which is a void* pointer to the first of the variadic arguments. To access the arguments, _argptr must be cast to a pointer to the expected argument type: " ...
Although this was correct for 32 bits, it is now complete nonsense -- it produces garbage on 64 bits. And it compiles silently.
I think this is the most severe spec bug ever.
Comment #1 by clugdbug — 2012-04-12T07:33:14Z
And also the second example in the spec (involving core.vararg) doesn't compile, because it refers to a non-existent print() function:
_arguments[i].print();
Comment #2 by github-bugzilla — 2012-05-04T10:39:11Z