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.
eg
#if defined(__clang__) || defined(__GNUC__)
#define stdCallConv __attribute__ ((stdcall))
#else
...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.