This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3.4] Warn for always-false bitwise ands
On Mon, Mar 24, 2003 at 12:34:51AM +0000, John Levon wrote:
> So, I'll do a new patch without a separate -W option, and to check only
> for <bit_and_expr < truth_not_expr, !integer_onep<integer_cst> > >, yes
> ? (well with the necessary nop-peeking)
Not quite. Ignore the integer_onep. <AND <TRUTH_NOT> <CONSTANT>>
should be sufficient for the warning. And the warning shouldn't
be about being "always false", it should be about "bitwise and
vs boolean not".
r~