[cfe-commits] [PATCH] Add fixit notes for -Wconstant-logical-operand

Matt Beaumont-Gay matthewbg at google.com
Mon Aug 15 10:03:17 PDT 2011


On Sun, Aug 14, 2011 at 20:39, Sean Hunt <scshunt at csclub.uwaterloo.ca> wrote:
> On Fri, Aug 12, 2011 at 16:27, Matt Beaumont-Gay <matthewbg at google.com>
> wrote:
>>
>> I implemented these for purely selfish reasons, viz., I want to apply
>> them en masse to some hilariously broken code. What I feel might be
>> missing is a way to just silence the warning, though I'm not sure how
>> useful that would be.
>>
>> Also, my impression is that the prevailing style in diagnostic text is
>> to surround operators in single quotes, so I've changed the warning to
>> match; any objections?
>>
>> -Matt
>
> My only comment is on the note text, perhaps "bitwise '%0' could be used
> instead"?

I'm not sold. That sounds like it's implying no change in semantics,
which is untrue. Maybe just the classic "did you mean..."?



More information about the cfe-commits mailing list