https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80511
Marc Glisse <glisse at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[8 Regression] |[8 Regression]
|gcc.dg/Wstrict-overflow-18. |gcc.dg/Wstrict-overflow-18.
|c |c
| |gcc.dg/Wstrict-overflow-7.c
| |gcc.dg/pragma-diag-3.c
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=253642
2 more testcases got xfailed: gcc.dg/Wstrict-overflow-7.c and
gcc.dg/pragma-diag-3.c.
Some possibilities:
- add the warning in match.pd: users keep complaining about those
strict-overflow warnings, so we would have to take it out of Wall.
- add the warning in match.pd, restricted to GENERIC: that gets us close to the
gcc-7 situation.
- reimplement the warning in the front-end. In general, telling users that we
simplified x+1<x to false is an optimization note, not a valid warning (it
happens in perfectly fine code where we don't have any easy workaround).
However, when the user literally writes x+1<x, that does deserve a warning.
This would likely miss a lot of errors we currently notice, but that's
unavoidable.