I have many C programs without recursion. I want to get the program without user-defined function but the main function. GCC can do the inline but that's in IR level so I can't get C code .
SOURCE:
int calc(int a , int b)
{
a=a+b-2;
return a ;
}
int main()
{
int x=4,y=7;
x=calc(x,y);
return 0 ;
}
TARGET:
int main()
{
int x=4,y=7;
int calc_A=x,calc_B=y;
calc_A=calc_A+calc_B-2;
x=calc_A;
return 0 ;
}