stdcall-fastcall.c [plain text]
void __attribute__((fastcall)) f1(void);
void __attribute__((stdcall)) f2(void);
void __attribute__((thiscall)) f3(void);
void __attribute__((fastcall)) f4(void) {
f1();
}
void __attribute__((stdcall)) f5(void) {
f2();
}
void __attribute__((thiscall)) f6(void) {
f3();
}
void (__attribute__((fastcall)) *pf1)(void) = f1;
void (__attribute__((stdcall)) *pf2)(void) = f2;
void (__attribute__((thiscall)) *pf3)(void) = f3;
void (__attribute__((fastcall)) *pf4)(void) = f4;
void (__attribute__((stdcall)) *pf5)(void) = f5;
void (__attribute__((thiscall)) *pf6)(void) = f6;
int main(void) {
f4(); f5(); f6();
pf1(); pf2(); pf3(); pf4(); pf5(); pf6();
return 0;
}
void __attribute((stdcall)) f7(foo) int foo; {}
void f8(void) {
f7(0);
}