Code optimization: warning for code that hangs
Robert Dewar
dewar@adacore.com
Sun Jun 24 21:55:00 GMT 2012
On 6/24/2012 12:09 PM, Ãngel González wrote:
> "Peter A. Felvegi" writes:
>>>> My question is: wouldn't it be possible to print a warning when a jmp
>>>> to itself or trivial infinite recursion is generated? The code
>>>> compiled fine w/ -Wall -Wextra -Werror w/ 4.6 and 4.7.
> Note that if the target architecture is a microcontroller, an endless
> loop can be a legitimate way to finish / abort the program.
>
But not an infinite recursion! And an endless loop is such a rare
case that it deserves a warning, it's a false positive in this case,
so what?
More information about the Gcc
mailing list