PATCH COMMITTED: gcc 4.2 support for -Wstrict-overflow/-fstrict-overflow

Richard Guenther
Mon Mar 12 10:46:00 GMT 2007

On 3/12/07, Andrew Pinski <> wrote:
> On 11 Mar 2007 21:40:24 -0700, Ian Lance Taylor <> wrote:
> > I have just committed the gcc 4.2 patch which adds support for
> > -Wstrict-overflow and -fstrict-overflow, as previously approved.  A
> > bunch of testing was required.  Lucky for me that Mark's release
> > candidate was delayed.
> Wait, this still introduces a missed optimization regression as
> mentioned by Richard Guenther so why did you apply it before that was
> resolved?

As far as I understand the patch will always introduce missed-optimization
regressions for "artificial" testcases - it's just the way the patch
is designed.
I agree that the flipping half-range regression is the worst one and it does
surely happen in real code.  I don't know how far the RM was aware of
these potential problems (after all I found out about them after the RMs
approval of the backport).  Still the backport is worth it, maybe with biting
the bullet and disabling overflowed-infs for -fstrict-overflow and not


More information about the Gcc-patches mailing list