This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/43772] Errant -Wlogical-op warning when testing limits
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 28 Apr 2012 12:49:57 +0000
- Subject: [Bug c/43772] Errant -Wlogical-op warning when testing limits
- Auto-submitted: auto-generated
- References: <bug-43772-4@http.gcc.gnu.org/bugzilla/>
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".