From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyfI1-0004SF-6Y for qemu-devel@nongnu.org; Tue, 17 Nov 2015 07:23:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyfHx-000445-BE for qemu-devel@nongnu.org; Tue, 17 Nov 2015 07:23:13 -0500 Received: from mail-vk0-x229.google.com ([2607:f8b0:400c:c05::229]:33480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyfHx-00043z-6z for qemu-devel@nongnu.org; Tue, 17 Nov 2015 07:23:09 -0500 Received: by vkgy188 with SMTP id y188so951756vkg.0 for ; Tue, 17 Nov 2015 04:23:08 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <564B193C.9070901@redhat.com> References: <1447754381-29882-1-git-send-email-pbonzini@redhat.com> <564B0150.7030400@redhat.com> <564B0386.4030701@redhat.com> <564B0817.1010704@redhat.com> <564B193C.9070901@redhat.com> From: Peter Maydell Date: Tue, 17 Nov 2015 12:22:49 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: QEMU Developers On 17 November 2015 at 12:10, Paolo Bonzini wrote: > On 17/11/2015 12:22, Peter Maydell wrote: >> * gcc need to document this (this is a stronger statement than >> what they currently have since it is a guarantee not to change >> the semantics in the future if -fwrapv is set) > > Actually they document it under -fstrict-overflow ("Using '-fwrapv' > means that integer signed overflow is fully defined: it wraps") but it > would be nice to add it under -fwrapv as well. I'll send a patch. My interpretation of that quote was that the gcc devs don't include shifts in their definition of "integer signed overflows" (since -fwrapv is very clear about what it affects.) Either way clarity would be good, so thanks for taking on the patch. thanks -- PMM