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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Your point that unsigned long == -1 vs. unsigned long == -1u is not the same
is a very good point to continue diagnosing this.

Now, for equality compares of operands of different sign but same precision
we could avoid diagnosing those with -Wsign-compare and instead diagnose
it elsewhere given obviously mathematically -1u != -1 - it might be a
case for -Wconversion?  Aka C operand promotion rules change the mathematical
meaning?

Reply via email to