This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: undefined behavior of signed left shifts (was Re: [PULL 00/40] ppc patch queue 2015-06-03)
- From: Peter Maydell <peter dot maydell at linaro dot org>
- To: Paolo Bonzini <pbonzini at redhat dot com>
- Cc: Alexander Graf <agraf at suse dot de>, "qemu-ppc at nongnu dot org" <qemu-ppc at nongnu dot org>, QEMU Developers <qemu-devel at nongnu dot org>, Michael Roth <mdroth at linux dot vnet dot ibm dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 5 Jun 2015 18:33:24 +0100
- Subject: Re: undefined behavior of signed left shifts (was Re: [PULL 00/40] ppc patch queue 2015-06-03)
- Authentication-results: sourceware.org; auth=none
- References: <1433367941-119488-1-git-send-email-agraf at suse dot de> <CAFEAcA_qVShs0+FwRGVXE=u5g1Bx9Z6knoG71rnE9mcKSEwyEg at mail dot gmail dot com> <5571B3BE dot 60003 at redhat dot com> <CAFEAcA9ZrQPf1phr5ffuzXMcVGFuGDQWqK=YmGzY2faC36p49A at mail dot gmail dot com> <5571BA13 dot 3040507 at redhat dot com> <CAFEAcA-BLmhegzqVHUH88PfHxAnBq8QYBW8UNUp858+08Db9zA at mail dot gmail dot com> <5571BE3D dot 9050002 at redhat dot com> <CAFEAcA9wASC_-dtbup=jX36NPqVw50GrhP8R-asApnFFSv5jgw at mail dot gmail dot com> <5571C679 dot 2010202 at redhat dot com>
On 5 June 2015 at 16:55, Paolo Bonzini <pbonzini@redhat.com> wrote:
> The GCC manual says "GCC does not use the latitude given in C99 and C11
> only to treat certain aspects of signed '<<' as undefined, but this is
> subject to change". It would certainly be nice if they removed the
> "this is subject to change" part.
Does clang provide a similar guarantee? I couldn't find one in
a quick scan through the docs, but I might be looking in the
wrong place.
thanks
-- PMM