[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] configure: Disable -Wtautological-type-limit-compare
From: |
Richard Henderson |
Subject: |
Re: [PATCH] configure: Disable -Wtautological-type-limit-compare |
Date: |
Fri, 5 Jun 2020 10:45:19 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 6/5/20 8:53 AM, Alex Bennée wrote:
>
> Richard Henderson <richard.henderson@linaro.org> writes:
>
>> Clang 10 enables this by default with -Wtype-limit.
>>
>> All of the instances flagged by this Werror so far have been
>> cases in which we really do want the compiler to optimize away
>> the test completely. Disabling the warning will avoid having
>> to add ifdefs to work around this.
>>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>> configure | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/configure b/configure
>> index f087d2bcd1..693f01327f 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2009,6 +2009,8 @@ gcc_flags="-Wno-missing-include-dirs -Wempty-body
>> -Wnested-externs $gcc_flags"
>> gcc_flags="-Wendif-labels -Wno-shift-negative-value $gcc_flags"
>> gcc_flags="-Wno-initializer-overrides -Wexpansion-to-defined $gcc_flags"
>> gcc_flags="-Wno-string-plus-int -Wno-typedef-redefinition $gcc_flags"
>> +gcc_flags="$gcc_flags -Wno-tautological-type-limit-compare"
>> +
>
> nit: the pattern is reversed compared to the previous lines (foo $gcc_flags)
Not a nit. The -Wno- must follow -Wtype-limit, or -Wtype-limit will turn it
back on.
r~
>
> I had exactly the same patch in my local tree but it wasn't enough for
> clang-9 which I was using for a sanitiser build. I ended up
> having to apply --disable-werrror to the configuration.
>
> Anyway:
>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
>