[Issue 670] _argptr is char *

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 18 05:50:08 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=670


larsivar at igesund.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |larsivar at igesund.net




------- Comment #4 from larsivar at igesund.net  2007-09-18 07:50 -------
(In reply to comment #2)
> According to the spec, only DMD exists. It doesn't mention portability.
> 
> va_list is not a char* always, it's a "target-specific type". Don't cast.
> It needs the builtin va_list and the va_arg template for it to work...
> 
> I'm not sure how it could be rewritten to support DMD's direct access ?
> But David can probably give a much better explanation of the va_lists.
> 

Considering that the target-specific type usually is based on some C
specification, it is not particularly useful for D, as has been shown with
Tango's use of indexing into the vararg list on platforms like x86_64. For
this feature to be useful, it needs to be defined in a way that makes it
portable, and afaik, David tries to fix this. The reason it wasn't
implemented this way before, was that the C version already present in gcc
was used.


-- 



More information about the D.gnu mailing list