This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/64610] No -Wbool-compare warning on "(0 != a) >= 0"
- From: "chengniansun at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Jan 2015 06:38:52 +0000
- Subject: [Bug c/64610] No -Wbool-compare warning on "(0 != a) >= 0"
- Auto-submitted: auto-generated
- References: <bug-64610-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64610
--- Comment #1 from Chengnian Sun <chengniansun at gmail dot com> ---
I have another test case, for which either -Wtype-limits or -Wbool-compare does
not warn.
$: cat s.c
void f(int b) {
(b == 1) >= 0UL;
}
$:
$: gcc-trunk -Wtype-limits -Wbool-compare -c s.c
$: