_argptr woes
Sean Kelly
sean at f4.ca
Fri Mar 16 20:04:03 PDT 2007
Frits van Bommel wrote:
> kris wrote:
>> The D spec says:
>>
>> "The implementiations of these variadic functions have a special local
>> variable declared for them, _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"
>>
>>
>> To me, this means that a D compiler must implement _argptr in these
>> terms. Is that indeed the case, Walter? Or is my interpretation
>> incorrect?
>
> That would seem to be what it means.
> That would also seem to be a pretty big portability bug in the spec. On
> amd64 definitely !is(va_list == void*) :P. (at least for current GDC,
> GCC and any other compiler following
> http://www.x86-64.org/documentation/abi.pdf)
Perhaps I'm being thick, but why in the world would a CPU spec need to
contain parameter passing rules? Or even stack frame information? I
can see an OS caring about stack frame, but parameter passing seems like
it should be language-dependent.
Sean
More information about the Digitalmars-d
mailing list