https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14557

nsz at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nsz at gcc dot gnu.org

--- Comment #20 from nsz at gcc dot gnu.org ---
(In reply to felix from comment #19)
> The number of duplicates of this report isn't terribly high, but doesn't
> this at least deserve a mention in the 'Disappointments' section of the
> manual?
> 
> In any case, the following macro could be used as a workaround, under some
> rather reasonable assumptions:
> 
> #if __STDC_VERSION__ >= 201112L
> #define va_ptr(ap) _Generic(&(ap), va_list *: &(ap), default: (va_list
> *)(ap))
...

the standard conform way to deal with this issue is to

va_list ap2;
va_copy(ap2, ap);

and then use &ap2, this always works.

the proposed macros are both broken and unnecessary.

Reply via email to