[Bug c/66773] sign-compare warning for == and != are pretty useless
vincent-gcc at vinc17 dot net
gcc-bugzilla@gcc.gnu.org
Fri Nov 15 10:17:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66773
Vincent Lefèvre <vincent-gcc at vinc17 dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vincent-gcc at vinc17 dot net
--- Comment #7 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to Segher Boessenkool from comment #1)
> There certainly are cases where these warnings are inconvenient, but
> there also are cases where they are quite useful -- e.g.
>
> int f(void) { return 0xffffffff == -1; }
I'd say that the warning is inconvenient here, since if the developer really
wants to do a test equivalent to the above one, there seems no good way to
avoid the warning with portable code.
More information about the Gcc-bugs
mailing list