yes. you are right.
test.c
#include <stdio.h>
#include <stdlib.h>
static inline int funa(int i)
{
return i++;
}
main()
{
int i=1;
i = funa(i);
}
gcc -S test.c
.file "test.c"
.version "01.01"
gcc2_compiled.:
.text
.align 16
.globl main
.type main,@function
main:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
movl $1, -4(%ebp)
subl $12, %esp
pushl -4(%ebp)
call funa
addl $16, %esp
movl %eax, %eax
movl %eax, -4(%ebp)
movl %ebp, %esp
popl %ebp
ret
.Lfe1:
.size main,.Lfe1-main
.align 16
.type funa,@function
funa:
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movl %eax, %edx
incl %eax
movl %edx, %eax
popl %ebp
ret
.Lfe2:
.size funa,.Lfe2-funa
.ident "GCC: (GNU) 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)"
gcc -S -O2 test.c
.file "test.c"
.version "01.01"
gcc2_compiled.:
.text
.align 16
.globl main
.type main,@function
main:
pushl %ebp
movl %esp, %ebp
popl %ebp
ret
.Lfe1:
.size main,.Lfe1-main
.ident "GCC: (GNU) 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)"