[Issue 13125] Cannot implicitly convert string* to __va_list_tag*

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jul 14 03:40:44 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13125

yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies at gmail.com

--- Comment #9 from yebblies <yebblies at gmail.com> ---
(In reply to Walter Bright from comment #1)
> The trouble is that va_list was a void* in 2.065, but is now a magic type
> that is handled specially by the back end. Doing what you're doing in this
> code is really not supportable.
> 

It's not actually a magic backend-known type, but it is platform dependent.

(In reply to Jacob Carlborg from comment #8)
> 
> Any way. Do you have a suggestion for a workaround? What is the appropriate
> way to forward varargs?

As far as I know there is not supported way to hack into varargs like this.  As
an awful non-portable self-destructive workaround you can use an explicit cast
to get the old behaviour.

To do this correctly, you will need to research the various platforms' varargs
formats and explicitly match them.  If possible I would recommend using a
different implementation approach.

--


More information about the Digitalmars-d-bugs mailing list