[M3devel] gcc/eh/setjmp
Jay
jayk123 at hotmail.com
Mon Jan 21 17:06:37 CET 2008
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!
http://biggestloser.msn.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080121/a0e71d8d/attachment-0002.html>
More information about the M3devel
mailing list