This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/7543] no warning for always-false "if (!a & 0x4)" bitwise and on boolean value
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Oct 2004 14:25:27 -0000
- Subject: [Bug c/7543] no warning for always-false "if (!a & 0x4)" bitwise and on boolean value
- References: <20020808090600.7543.trt@sas.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-10-01 14:25 -------
As the example you show in your patch demonstrates, there are even cases inside
gcc that would be triggered by this patch. I believe it would therefore be useful.
Also, jsm's response was not dismissive of the patch at all, though we would indeed
have to have a Changelog entry as well as testcases.
Joseph, would you mind commenting on the usefulness of an approach as mentioned
in the patch linked from comment #1?
W.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |jsm at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7543