This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-3.0: Obvious infinite recursion not detected
Fergus Henderson wrote:
>[analysis]
yup.
> But this would be more difficult to implement than the Mercury
> compiler's warning, and would catch fewer cases; I'm not sure if it's
> really worth the effort.
Yeah, that's my take on this too. Although in theory it's as hard
as the 'return without value' problem, I think in practice it is much
harder to have a warning with sufficiently small % of false negatives
and false positives. Anyway, unlike the 'return without value' case,
this one is easy to spot in a running program (unless tail recursion
optimizer is on), because you very quickly run out of stack. (You do
check all your code paths, don't you ;-)
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org