https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89127

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
The warning is not about all comparisons that are always true/false, only about
the case where this is "due to the limited range of the data type" (let me
stress **type**). Only the first of your examples has that property (it can be
rewritten as x<INT_MIN), the others are mathematical properties that would
still apply to a bigint and thus don't belong in -Wtype-limits.
x-x<0 is closer to -Wtautological-compare, if anything, although we may not
want to enable this folding version as widely as the more direct 0<0 version.

Reply via email to