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: PR c/7543 no warning for always-false "if (!a & 0x4)" bitwise and no boolean value


"Joseph S. Myers" <joseph@codesourcery.com> writes:

> On Thu, 28 Aug 2008, Manuel LÃpez-IbÃÃez wrote:
>
>> This is a warning suggested by Tom Truscott who has tested it on real
>> code for a long time with a very low false positive rate. It seems it
>> catches a real bug in GCC in value-prof.c. It doesn't work in C++
>> because of the way C++ parses binary operators. I added a note about
>> it and a XFAILED testcase. Any suggestions on how to make it work in
>> C++ are welcome.
>> 
>> Bootstrapped and regression tested on x86_64-unknown-linux-gnu with
>> --enable-languages=all,ada
>> 
>> OK for trunk?
>
> The C front-end changes and testcase are OK if you also update the comment 
> on the original_code element of the definition of struct c_expr in 
> c-tree.h to reflect the new cases in which it is no longer ERROR_MARK.

The rest of the patch is OK.

Thanks.

Ian


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