[Bug target/50818] va_list is filled incorrectly in functions with ms_abi attribute on amd64

dwmw2 at infradead dot org gcc-bugzilla@gcc.gnu.org
Sat Apr 16 18:48:00 GMT 2016


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

--- Comment #8 from David Woodhouse <dwmw2 at infradead dot org> ---
(In reply to H.J. Lu from comment #7)
> As a workaround, you can try 
>   __builtin_ms_va_*
> instead of
>   __builtin_va_*

The problem is that in the UEFI build we don't *know* what ABI we'll be built
with for many functions. Some functions are explicitly marked EFIAPI, which
translates to __attribute__((ms_abi)). But any function which isn't explicitly
exported is functions are 'native'. Except where we got tired of the resulting
pain (this bug included), and added -fms-abi to the command line. Or when we're
building on a platform that *does* target Windows or Windows-like ABI natively.
Or when the wind is blowing in the other direction.

So hard-coding it doesn't work. We really need the builtins to do the right
thing for the function they're used from.


More information about the Gcc-bugs mailing list