qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] configure: Disable -Wtautological-type-limit-compare


From: Eric Blake
Subject: Re: [PATCH] configure: Disable -Wtautological-type-limit-compare
Date: Thu, 4 Jun 2020 06:57:46 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]