On 08/16/2017 08:29 AM, Marek Polacek wrote:
> This patch improves -Wtautological-compare so that it also detects
> bitwise comparisons involving & and | that are always true or false, e.g.
>
> if ((a & 16) == 10)
> return 1;
>
> can never be true. Note that e.g. "(a & 9) == 8" is *not*
Ping.
On Fri, Aug 25, 2017 at 02:47:45PM +0200, Marek Polacek wrote:
> Ping.
>
> On Wed, Aug 16, 2017 at 05:24:56PM +0200, Marek Polacek wrote:
> > On Wed, Aug 16, 2017 at 11:07:36AM -0400, David Malcolm wrote:
> > > On Wed, 2017-08-16 at 16:29 +0200, Marek Polacek wrote:
> > > > This patch
Ping.
On Wed, Aug 16, 2017 at 05:24:56PM +0200, Marek Polacek wrote:
> On Wed, Aug 16, 2017 at 11:07:36AM -0400, David Malcolm wrote:
> > On Wed, 2017-08-16 at 16:29 +0200, Marek Polacek wrote:
> > > This patch improves -Wtautological-compare so that it also detects
> > > bitwise comparisons
On Wed, Aug 16, 2017 at 11:07:36AM -0400, David Malcolm wrote:
> On Wed, 2017-08-16 at 16:29 +0200, Marek Polacek wrote:
> > This patch improves -Wtautological-compare so that it also detects
> > bitwise comparisons involving & and | that are always true or false,
> > e.g.
> >
> > if ((a & 16)
On 8/16/17, David Malcolm wrote:
> On Wed, 2017-08-16 at 16:29 +0200, Marek Polacek wrote:
>> This patch improves -Wtautological-compare so that it also detects
>> bitwise comparisons involving & and | that are always true or false,
>> e.g.
>>
>> if ((a & 16) == 10)
>>
On Wed, 2017-08-16 at 16:29 +0200, Marek Polacek wrote:
> This patch improves -Wtautological-compare so that it also detects
> bitwise comparisons involving & and | that are always true or false,
> e.g.
>
> if ((a & 16) == 10)
> return 1;
>
> can never be true. Note that e.g. "(a & 9) ==
This patch improves -Wtautological-compare so that it also detects
bitwise comparisons involving & and | that are always true or false, e.g.
if ((a & 16) == 10)
return 1;
can never be true. Note that e.g. "(a & 9) == 8" is *not* always false
or true.
I think it's pretty straightforward