qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/3] disas/arm: avoid clang shifting negative si


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 3/3] disas/arm: avoid clang shifting negative signed warning
Date: Tue, 10 Nov 2015 18:33:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 10/11/2015 16:57, Stefan Hajnoczi wrote:
> clang 3.7.0 on x86_64 warns about the following:
> 
>   disas/arm.c:1782:17: warning: shifting a negative signed value is undefined 
> [-Wshift-negative-value]
>     imm |= (-1 << 7);
>             ~~ ^
> 
> Note that this patch preserves the tab indent in this source file
> because the surrounding code still uses tabs.
> 
> Signed-off-by: Stefan Hajnoczi <address@hidden>

I would like to know a case where (except with ubsan) clang actually
uses the optimization.

If not, this is just error message theatre (which is not news for clang)
and shouldn't have been part of -Wall.

Paolo



reply via email to

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