<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>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.<BR>
 <BR>
 - Jay<BR><BR><BR>

<HR id=stopSpelling>
<BR>
> CC: m3devel@elegosoft.com<BR>> From: hosking@cs.purdue.edu<BR>> Subject: Re: [M3devel] gcc/eh/setjmp<BR>> Date: Mon, 21 Jan 2008 10:59:35 -0500<BR>> To: jayk123@hotmail.com<BR>> <BR>> I think gcc was forced not to act on it by use of LABEL_PRESERVE_P <BR>> and FORCED_LABEL as well as making the function containing the TRY <BR>> non-inlinable, plus lots of other goop to let the flow analyser know <BR>> that funky stuff was going on at labels for TRY scopes. Take a look <BR>> at the lines of parse.c that deal with "set_label" when "barrier=TRUE".<BR>> <BR>> On Jan 21, 2008, at 5:50 AM, Jay wrote:<BR>> <BR>> > Folks, try adding -Wunreachable-code to your m3back options and <BR>> > tell me if you don't get loads of warnings.<BR>> > for stuff like:<BR>> ><BR>> > TRY<BR>> > return Foo();<BR>> > ELSE<BR>> > return FALSE;<BR>> ><BR>> > I get them on NT386GNU and PPC_DARWIN.<BR>> ><BR>> > Functions with TRY need, in gcc parlance:<BR>> > calls_setjmp<BR>> ><BR>> > and the exception/finally blocks need:<BR>> > has_nonlocal_label<BR>> ><BR>> > and functions with RAISE might need:<BR>> > has_nonlocal_goto<BR>> ><BR>> > Luckily, gcc doesn't seem to act on what it figure out.<BR>> ><BR>> > - Jay<BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> > Helping your favorite cause is as easy as instant messaging. You <BR>> > IM, we give. Learn more.<BR>> <BR><BR><br /><hr />Shed those extra pounds with MSN and The Biggest Loser! <a href='http://biggestloser.msn.com/' target='_new'>Learn more.</a></body>
</html>