[M3devel] gcc/eh/setjmp

Tony Hosking hosking at cs.purdue.edu
Mon Jan 21 17:57:29 CET 2008


Yeah, we should be able to do that.  I wonder if setting  
DECL_NONLOCAL on barrier labels will do the trick?

On Jan 21, 2008, at 11:06 AM, Jay wrote:

> Any chance of giving gcc enough or the right information so that - 
> Wunreachable-code can be used without hitting a bunch of false  
> positives? It's not being dumb, not that sort of false positive. It  
> reports every except block and anything after a try { return }  
> except { } as unreachable.
>
>  - Jay
>
>
>
> > CC: m3devel at elegosoft.com
> > From: hosking at cs.purdue.edu
> > Subject: Re: [M3devel] gcc/eh/setjmp
> > Date: Mon, 21 Jan 2008 10:59:35 -0500
> > To: jayk123 at hotmail.com
> >
> > I think gcc was forced not to act on it by use of LABEL_PRESERVE_P
> > and FORCED_LABEL as well as making the function containing the TRY
> > non-inlinable, plus lots of other goop to let the flow analyser know
> > that funky stuff was going on at labels for TRY scopes. Take a look
> > at the lines of parse.c that deal with "set_label" when  
> "barrier=TRUE".
> >
> > On Jan 21, 2008, at 5:50 AM, Jay wrote:
> >
> > > Folks, try adding -Wunreachable-code to your m3back options and
> > > tell me if you don't get loads of warnings.
> > > for stuff like:
> > >
> > > TRY
> > > return Foo();
> > > ELSE
> > > return FALSE;
> > >
> > > I get them on NT386GNU and PPC_DARWIN.
> > >
> > > Functions with TRY need, in gcc parlance:
> > > calls_setjmp
> > >
> > > and the exception/finally blocks need:
> > > has_nonlocal_label
> > >
> > > and functions with RAISE might need:
> > > has_nonlocal_goto
> > >
> > > Luckily, gcc doesn't seem to act on what it figure out.
> > >
> > > - Jay
> > >
> > >
> > >
> > >
> > >
> > > Helping your favorite cause is as easy as instant messaging. You
> > > IM, we give. Learn more.
> >
>
>
> Shed those extra pounds with MSN and The Biggest Loser! Learn more.




More information about the M3devel mailing list