This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR c/9530


On Mon, Feb 03, 2003 at 08:24:45PM +0100, Eric Botcazou wrote:
> On the other hand, we can preventively push onto the stack:
> 
> void foo(int i);
> 
> float bar(int i)
> {
>    /* we can push here */
>    foo(i);
> }

No, we can't.  The fp stack must be empty at function entry.

Just because foo doesn't return a value doesn't mean it
(or one of its subroutines) doesn't do floating point internally.
If we enter foo with the stack non-empty, we risk a stack-overflow
exception.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]