[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] configure: Disable -Wtautological-type-limit-compare
From: |
Alex Bennée |
Subject: |
Re: [PATCH] configure: Disable -Wtautological-type-limit-compare |
Date: |
Fri, 05 Jun 2020 17:03:33 +0100 |
User-agent: |
mu4e 1.5.1; emacs 28.0.50 |
Thomas Huth <thuth@redhat.com> writes:
> On 05/06/2020 14.51, Philippe Mathieu-Daudé wrote:
>> On 6/4/20 8:11 AM, Philippe Mathieu-Daudé wrote:
>>> On 6/4/20 5:45 AM, Richard Henderson wrote:
>>>> 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.
>>>>
>>>
>>> Fixes: https://bugs.launchpad.net/qemu/+bug/1878628
>>>
>>> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>
>> Clarifying: I tested with clang-10, but Alex/Cornelia reported on IRC
>> the failure persist with clang-9 until using --disabler-werror.
>
> Does -Wno-tautological-constant-compare help on Clang-9 instead?
Yeah that variant works for clang-9
Tested-by: Alex Bennée <alex.bennee@linaro.org>
>
> Thomas
>
>
>>>
>>> I dare to add:
>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>
>>>> 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"
>>>> +
>>>> # Note that we do not add -Werror to gcc_flags here, because that would
>>>> # enable it for all configure tests. If a configure test failed due
>>>> # to -Werror this would just silently disable some features,
>>>>
>>>
>>
>>
--
Alex Bennée