[cfe-dev] what does __attribute__((__stdcall__)) really mean?
eli.friedman at gmail.com
Wed Oct 12 20:33:35 PDT 2011
On Wed, Oct 12, 2011 at 8:26 PM, Philip Ashmore
<contact at philipashmore.com> wrote:
> Hi there.
> I've got a library that uses the stdcall calling convention with some
> functions, but there are problems.
> 1. gcc doesn't like __attribute__((__stdcall__)) in some contexts and
> complains that "warning: ‘__stdcall__’ attribute ignored [-Wattributes]".
> If I change this to __attribute__((ms_abi)) the warnings disappear.
> clang doesn't warn about this, leading me to conclude that it can do
> this where gcc cannot.
> Should I define a STDCALL macro and define it differently depending on
> the compiler?
> What should I use if I want to create a library with one compiler that
> links to a program compiled with the other?
Can you give a small code example of what isn't working?
More information about the cfe-dev