This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Code optimization: warning for code that hangs


On 6/24/2012 11:22 AM, Richard Guenther wrote:

I suppose I think it would be reasonable to issue a -Wall warning for
code like that.  The trick is detecting it.  Obviously there is nothing
wrong with a recursive call.  What is different here is that the
recursive call is unconditional.  I don't see a way to detect that
without writing a specific warning pass to look for that case.

Ada has this warning, and it has proved useful!



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]