From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zydip-0006t1-N0 for qemu-devel@nongnu.org; Tue, 17 Nov 2015 05:42:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zydio-0002v4-QH for qemu-devel@nongnu.org; Tue, 17 Nov 2015 05:42:47 -0500 Received: from mail-vk0-x231.google.com ([2607:f8b0:400c:c05::231]:33829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zydio-0002uz-Ly for qemu-devel@nongnu.org; Tue, 17 Nov 2015 05:42:46 -0500 Received: by vkha189 with SMTP id a189so2554515vkh.1 for ; Tue, 17 Nov 2015 02:42:46 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <564B0386.4030701@redhat.com> References: <1447754381-29882-1-git-send-email-pbonzini@redhat.com> <564B0150.7030400@redhat.com> <564B0386.4030701@redhat.com> From: Peter Maydell Date: Tue, 17 Nov 2015 10:42:26 +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 10:37, Paolo Bonzini wrote: > > > 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. Again, can you get both sets of compiler devs to agree and document this? If not, we can't rely on it. thanks -- PMM