This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3.4] Warn for always-false bitwise ands


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

With:

if( MASK & 0xFF )


I think it's desirable to be able to do it without getting a new warning.


Regards,

John.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]