qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values
Date: Tue, 17 Nov 2015 11:37:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 17/11/2015 11:36, Peter Maydell wrote:
> > If and when this happens we will add "-fno-strict-overflow" for clang,
> > just like we are using "-fno-strict-aliasing" already.
>
> -fno-strict-overflow in clang is AFAICT just an alias for -fwrapv.
> These options control handling of signed overflow of addition,
> subtraction and multiplication; there is nothing I can find in the
> gcc or clang docs that suggests they have any effect on shift operations.

In the case of GCC, that's a corollary of the compiler not treating that
overflow as undefined.

Probably the same is true for clang.

Paolo



reply via email to

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