From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Laszlo Ersek <lersek@redhat.com>,
qemu-devel@nongnu.org
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 19:24:22 +0100 [thread overview]
Message-ID: <878u5web6x.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <564B67BE.5040001@redhat.com> (Paolo Bonzini's message of "Tue, 17 Nov 2015 18:45:34 +0100")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 17/11/2015 18:39, Markus Armbruster wrote:
>> The kernel switched from -fwrapv to -fno-strict-overflow in '09, because
>> -fwrapv was buggy in gcc 4.1 (already old then, completely irrelevant
>> now), and because it "seems to be much less disturbing to gcc too: the
>> difference in the generated code by -fno-strict-overflow are smaller
>> (compared to using neither flag) than when using -fwrapv", which may or
>> may not be still the case with compilers that matter today.
>>
>> Could you briefly explain why you picked -fwrapv and not
>> -fno-strict-overflow?
>
> Because -fno-strict-overflow doesn't silence ubsan, only -fwrapv does
> (it doesn't silence it for negative left shifts, but I've asked on
> gcc-patches whether they'd like to have that fixed as well).
Add something like that to the commit message, and you have my
Reviewed-by: Markus Armbruster <armbru@redhat.com>
> 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).
Makes only sense.
prev parent reply other threads:[~2015-11-17 18:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 14:09 [Qemu-devel] [PATCH v2 for 2.5] QEMU does not care about left shifts of signed negative values Paolo Bonzini
2015-11-17 14:47 ` Laszlo Ersek
2015-11-17 15:47 ` Markus Armbruster
2015-11-17 16:54 ` Laszlo Ersek
2015-11-17 17:06 ` Paolo Bonzini
2015-11-17 18:22 ` Markus Armbruster
2015-11-17 17:39 ` Markus Armbruster
2015-11-17 17:45 ` Paolo Bonzini
2015-11-17 18:19 ` Peter Maydell
2015-11-17 18:21 ` Paolo Bonzini
2015-11-17 18:24 ` Peter Maydell
2015-11-17 18:36 ` Paolo Bonzini
2015-11-17 18:40 ` Peter Maydell
2015-11-17 18:41 ` Markus Armbruster
2015-11-17 19:54 ` Paolo Bonzini
2015-11-17 18:24 ` Markus Armbruster [this message]
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=878u5web6x.fsf@blackfin.pond.sub.org \
--to=armbru@redhat.com \
--cc=lersek@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.