From: Eric Blake <eblake@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: thuth@redhat.com
Subject: Re: [PATCH] configure: Disable -Wtautological-type-limit-compare
Date: Thu, 4 Jun 2020 06:57:46 -0500 [thread overview]
Message-ID: <6eabad59-725c-67a7-1c39-81739ca96abe@redhat.com> (raw)
In-Reply-To: <20200604034513.75103-1-richard.henderson@linaro.org>
On 6/3/20 10:45 PM, 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.
While I proposed an alternative fix that was able to silence the most
recent error without #if, I do like this approach better - the warning
causes far more false positives than flagging actual bugs, especially
when we write code to allow 32->32, 64->32, and 64->64 host->emulation
paths, where one or more of those need the check but the others really
do a tautological compare, by the nature of the types involved.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2020-06-04 11:59 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
2020-06-04 11:57 ` Eric Blake [this message]
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=6eabad59-725c-67a7-1c39-81739ca96abe@redhat.com \
--to=eblake@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).