C++ Exception handling

Peter Naulls peter at chocky.org
Tue Mar 2 12:27:36 PST 2004


In message <4044E72E.8040909 at dsvr.net>
          Nick Burrett <nick at dsvr.net> wrote:

> Peter Naulls wrote:

> >    arg = assign_stack_local (BLKmode,
> > -			    GET_MODE_SIZE (Pmode)*(size+2),
> > +			    GET_MODE_SIZE (Pmode)*(size+1),
> >  			    0);
> >  
> >    arg = change_address (arg, Pmode, NULL_RTX);
> > 
> 
> I'm a little confused.  The code in the copy of gccsdk-2.95 in my CVS 
> tree is shown below.  The file hasn't been changed since 12 Sep 2001.
> 
>   /* XXX, FIXME: The stack space allocated this way is too long lived,
>      but there is no allocation routine that allocates at the level of
>      the last binding contour.  */
>   arg = assign_stack_local (BLKmode,
> 			    GET_MODE_SIZE (Pmode)*(size+1),
> 			    0);
> 
> 
> Where 'size+2' comes from, I really don't know.

It's his change.  I pasted it here before realising that his patch was
reversed, which corresponds with the comment:

>>(The code certainly looks wrong.  It says that the jump buffer starts two
>>words into the area allocated, but the requested size is
>>GET_MODE_SIZE(Pmode)*(size+1).)


-- 
Peter Naulls - peter at chocky.org        | http://www.chocky.org/
----------------------------------------------------------------------------
Free RISC OS Hosting                   | http://www.prowl.org/




More information about the gcc mailing list