[Bug c/17946] wanted: warning for "a && MASK" when "a & MASK" was probably intended
trt at acm dot org
gcc-bugzilla@gcc.gnu.org
Tue Oct 12 14:45:00 GMT 2004
------- Additional Comments From trt at acm dot org 2004-10-12 14:45 -------
Patch here: http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00990.html
This patch does not warn about "a && 1" for the reason noted in comment #1.
Some mistakes will go unwarned, but it still catches quite a lot.
The concern expressed in comment #2 is quite plausible, but I have not found it
to be an issue in practice. e.g. A gcc "make bootstrap" never triggers this
warning.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17946
More information about the Gcc-bugs
mailing list