qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Thomas Huth <thuth@redhat.com>
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH] configure: Disable -Wtautological-type-limit-compare
Date: Fri, 05 Jun 2020 17:03:33 +0100	[thread overview]
Message-ID: <878sh14i0a.fsf@linaro.org> (raw)
In-Reply-To: <51412778-5b6d-f080-c62b-eda42d9f52cc@redhat.com>


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


  reply	other threads:[~2020-06-05 16:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04  3:45 [PATCH] configure: Disable -Wtautological-type-limit-compare Richard Henderson
2020-06-04  5:08 ` Thomas Huth
2020-06-04  6:11 ` Philippe Mathieu-Daudé
2020-06-05 12:51   ` Philippe Mathieu-Daudé
2020-06-05 14:40     ` Thomas Huth
2020-06-05 16:03       ` Alex Bennée [this message]
2020-06-04 11:57 ` Eric Blake
2020-06-05 15:53 ` Alex Bennée
2020-06-05 17:45   ` Richard Henderson
2020-06-05 18:09     ` Peter Maydell
2020-06-05 18:26       ` Eric Blake
2020-06-08 10:35         ` Aleksandar Markovic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878sh14i0a.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=cohuck@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).