This is the mail archive of the gcc-help@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: Gcc silently transforms a finite loop to an infinite one


On 11/29/2011 8:29 AM, Michael Matz wrote:

IMHO it would be better to issue a warning when a finite loop is
transformed to an infinite one (as a result of -ftree-vrp).

-Wstrict-overflow gives a warning in this program. This warning isn't active by default. 4.1 didn't yet have this warning IIRC.

I would tend to agree that when this transformation is applied, an unconditional warning is appropriate. It's almost certainly indicative of a bug, and indeed the character case of this report is such a common case that I would look for it specifically and diagnose it (and preferably make it "work").


Ciao,
Michael.


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