Hi,
I would like to declare function with calling convention.
But getting following errors on CentOS 4.7 with GCC 3.4.6
test.c:3: error: syntax error before "display"
test.c:3: warning: data definition has no type or storage class
test.c:12: error: conflicting types for 'display'
test.c:3: error: previous declaration of 'display' was here
test.c:12: error: conflicting types for 'display'
test.c:3: error: previous declaration of 'display' was here
// Code
#include <stdio.h>
void __cdecl display(int i);
int main()
{
display(20);
return 0;
}
void display(int i)
{
printf("%0x", i);
}