|
发表于 2004-11-29 10:09:36
|
显示全部楼层
看汇编代码吧
好象i++和++i单独成一条语句是没什么区别
int main()
{
int i;
i++;
++i;
}
.file "u.c"
.def ___main; .scl 2; .type 32; .endef
.text
.globl _main
.def _main; .scl 2; .type 32; .endef
_main:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
andl $-16, %esp
movl $0, %eax
movl %eax, -8(%ebp)
movl -8(%ebp), %eax
call __alloca
call ___main
leal -4(%ebp), %eax
incl (%eax)
leal -4(%ebp), %eax
incl (%eax)
leave
ret |
|