* Drake Wilson: > extern int foo(int x); > int bar(void) { return foo(32); } > > On i386 this compiles to > > pushl %ebp > movl %esp, %ebp > subl $8, %esp > movl $32, (%esp) > call foo > leave > ret > > which doesn't correctly convert the call to foo into a tail call.
With the default cdecl calling convention, the call isn't in a tail position. %esp needs to be adjusted after the return of foo. Unless I'm missing something, this is very hard to fix. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]