[Bug c/43772] Errant -Wlogical-op warning when testing limits
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Apr 28 12:50:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43772
--- Comment #14 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-04-28 12:49:57 UTC ---
(In reply to comment #13)
>
> Except that this version would warn for x<INT_MIN && x>INT_MAX, whereas this
> belongs to other warnings. So testing the triviality of the first ranges seems
> best.
I don't understand. This warning (whatever its name) should precisely warn for
that with "logical 'and' of mutually exclusive tests is always false".
More information about the Gcc-bugs
mailing list