N
niklaus
Hi,
I have a doubt regarding inline functions.
1) When does the inline of function happen. During the preprocessing
stage or just before the object code is produced.
Can we see the source code after we have function inline just like cpp
abc.C shows me the expanded macros on linux.
2) Is it the source code that is inlined or the assembly code (object
code).
3) If i have a function like this
inline int add(int a,int b)
{
return a++ + ++b;
}
int main()
{
int k ,m,n;
m=3;
n=4;
k= add(m,n);
}
does something like this happen ? * i am not sure about this *
int main()
{
int k ;
m=3;
n=4;
tmp1=m;
tmp2=n;
k=( tmp1++ + ++tmp2);
}
How do i see something like this (i mean expanded version of inline
function ).
I have a doubt regarding inline functions.
1) When does the inline of function happen. During the preprocessing
stage or just before the object code is produced.
Can we see the source code after we have function inline just like cpp
abc.C shows me the expanded macros on linux.
2) Is it the source code that is inlined or the assembly code (object
code).
3) If i have a function like this
inline int add(int a,int b)
{
return a++ + ++b;
}
int main()
{
int k ,m,n;
m=3;
n=4;
k= add(m,n);
}
does something like this happen ? * i am not sure about this *
int main()
{
int k ;
m=3;
n=4;
tmp1=m;
tmp2=n;
k=( tmp1++ + ++tmp2);
}
How do i see something like this (i mean expanded version of inline
function ).