I have the following declaration of a function pointer:
extern long (__stdcall *FooPtr)(int* i);
That is, a function pointer that points to a function to be called with the stdcall calling convention (in VS terms).
How can I translate this declaration so that clang understands it?
__attribute__((stdcall))
is the right answer: clang supports the following list of attributes which, in syntax, are very similar to gcc's ones.
e.g.
#if defined(__clang__) || defined(__GNUC__)
#define stdCallConv __attribute__ ((stdcall))
#else
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With