qemu-devel
[Top][All Lists]
Advanced

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

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


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values
Date: Tue, 17 Nov 2015 18:19:53 +0000

On 17 November 2015 at 17:45, Paolo Bonzini <address@hidden> wrote:
> In the meanwhile I got some good news from the GCC folks:
>
>>> I think we should remove the ", but this is subject to change" in
>>> implement-c.texi (while replacing it with noting that ubsan will still
>>> diagnose such cases, and they will also be diagnosed where constant
>>> expressions are required).

That doesn't seem like more than half-good news to me. In particular,
if ubsan is still diagnosing these cases and they're still a
problem in some constant expressions then it is not true
that -fwrapv means "shifts of negative numbers etc are well
defined and valid in this dialect of C".

If the GCC folks don't want to go any further than that then
I think we should prefer to avoid this UB. (And there's still
the question of clang's position on this.)

thanks
-- PMM



reply via email to

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