This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17946] wanted: warning for "a && MASK" when "a & MASK" was probably intended
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Oct 2004 14:31:50 -0000
- Subject: [Bug c/17946] wanted: warning for "a && MASK" when "a & MASK" was probably intended
- References: <20041012141538.17946.trt@acm.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-14 14:31 -------
I still say that people do have a && 4 in their code meaning a != 0 && 4 !=0. Also a & 1 should be
caught too but that would just give too many false postives so there is no way for GCC to warn about
this.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17946