#include // stdcall is not important, can be any attribute #define ATTR __attribute__((__stdcall__)) // problem does not occur if there are no attributes // #define ATTR int ATTR actual_function() { return 42; } void* function_pointer; int main() { function_pointer = &actual_function; // compiles correctly int a = ((ATTR int(*) (void)) function_pointer)(); // => 42 printf("%i\n", a); // tcc thinks the result of this expression is a pointer // "warning: assignment makes integer from pointer without a cast" int b = ( (int(ATTR *)(void)) function_pointer)(); // compilation continues, but binary // crashes at runtime before it reaches this line printf("%i\n", b); return 0; }