This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 3.4] Warn for always-false bitwise ands
- From: John Vickers <john at xza5 dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: John Levon <levon at movementarian dot org>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 18 May 2003 20:56:31 +0100
- Subject: Re: [PATCH 3.4] Warn for always-false bitwise ands
- References: <20030321014040.GA76910@compsoc.man.ac.uk> <20030321210354.GE8150@redhat.com>
Richard Henderson wrote:
First of all, a warning like "bitwise and expression is always false"
should be on always, much like we do with "comparison is always false
due to limited range of data type".
If it's desirable to replace:
# if MASK & 0xFF
if( MASK & 0xFF )
I think it's desirable to be able to do it without getting a new warning.