[Bug c/17946] wanted: warning for "a && MASK" when "a & MASK" was probably intended

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Oct 14 14:31:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list