Subject: Re: Problem with GNU C 2.4.5
To: None <fwmiller@cs.umd.edu>
From: Charles M. Hannum <mycroft@gnu.ai.mit.edu>
List: netbsd-bugs
Date: 01/08/1995 22:01:33
I am wondering if I have found a bug or not. Consider the following code
which was generated by the GNU 2.4.5 compiler supplied with NetBSD 1.0 to
a C function called "devWrite":
.globl _devWrite
.type _devWrite,@function
_devWrite:
pushl %ebp
movl %esp,%ebp
pushl %ebx
... [snip] ...
movl -4(%ebp),%ebx
leave
ret
This is correct. The `leave' instruction pops the stack frame by
moving %ebp to %esp and popping the previous value of %ebp. The fact
that there is an extra item on the stack is irrelevant.
I am at a loss. This problem causes some serious trouble at execution time
but seems to me that if it were a bug, should have been caught by now.
What `serious trouble' does it cause?