[cfe-dev] -Wtautological-constant-compare issues

Aaron Ballman via cfe-dev cfe-dev at lists.llvm.org
Tue Jan 16 05:49:39 PST 2018


On Tue, Jan 16, 2018 at 8:42 AM, Hans Wennborg via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> On Fri, Dec 22, 2017 at 2:59 AM, John McCall via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
>>
>>> On Dec 21, 2017, at 4:28 PM, Roman Lebedev via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>>>
>>> Hi all!
>>>
>>> First of all, i'm sorry for creating this issue, it was not my intention :)
>>>
>>> I have created https://reviews.llvm.org/D41512
>>> Does it address all the concerns without completely killing the diagnostic?
>>
>> I think we should be more cautious and just treat it as an experimental warning like any other: that is, it should not be in any standard warning groups, even -Wextra.
>>
>> That is, for now, unless someone specifically passes -Wtautological-constant-compare (or -Weverything), they should just get the behavior prior to the implementation of this warning.  As Richard pointed out, this should only affect the new warning, not the existing -Wtautological-constant-out-of-range-compare.
>>
>> Don't feel bad about this; I think anyone who's done a significant amount of warning work has gone through the exact same thing.  I certainly know I have.  I think this is a very good diagnostic in principle, we just need to get it right.
>
> Apologies for coming late to the thread.
>
> What's the status here? Did everything land, and should we merge r321691 to 6.0?

It landed and I think we should merge r321691 to 6.0.

~Aaron



More information about the cfe-dev mailing list