Re: C/C++ PATCH to fix latest -Wbool-compare extension

2015-04-30 Thread Marek Polacek
On Thu, Apr 30, 2015 at 09:55:02AM -0600, Jeff Law wrote: > OK. Thanks. > BTW, you may also want to consider warning for integer types with a > precision of 1 bit. Yup, this is being tracked in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49706#c2 I suppose I'll get back to that in this stage1.

Re: C/C++ PATCH to fix latest -Wbool-compare extension

2015-04-30 Thread Jeff Law
On 04/30/2015 07:17 AM, Marek Polacek wrote: The problem here was that the -Wbool-compare warning about always false/true comparisons with 0/1 was assuming that both operands are of a boolean type. That was wrong so check for that, but don't get confused about bools promoted to int. This bug is

C/C++ PATCH to fix latest -Wbool-compare extension

2015-04-30 Thread Marek Polacek
The problem here was that the -Wbool-compare warning about always false/true comparisons with 0/1 was assuming that both operands are of a boolean type. That was wrong so check for that, but don't get confused about bools promoted to int. This bug is blocking aarch64 bootstrap, so I'm taking the l