This code compile succesfully (in visual studio),but there are some warnings like
source.cpp(7): warning C4068: unknown pragma
warning C4081: expected 'identifier'; found 'string'
#include <stdio.h>
#pragma aux __my "_*" \
parm routine [eax edx] \
value struct struct caller [ ] \
modify [eax edx];
int __pragma("__my") test(int a, int b, int c, int d, int e){
return a * 1 + b * 2 + c * 3 + d * 4 + e * 5;
}
int main(){
printf("test\n");
int x = test(1, 2, 3, 4, 5);
printf("X is %d\n", x);
return 0;
}
It should change the calling convention, but nothing happend.