http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59753
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org --- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Vincent Lefèvre from comment #4) > There's still an inconsistency without -Wpedantic, which is the point of > this bug. I've changed the bug title to: > > -Woverflow warning inconsistency with signed constant conversion between > T_MAX+1 and UT_MAX vs larger than UT_MAX I seem to remember this inconsistency is due to the exact definition of overflow given in the standard. But I agree that this is confusing for the rest of humanity who don't know the standard by heart. Also, the warnings would be useful by default since they are likely mistakes. > If this inconsistency is intentional, then it should be documented. The > current behavior doesn't match the documentation: Agreed.