From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zyds8-0005t9-Ru for qemu-devel@nongnu.org; Tue, 17 Nov 2015 05:52:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zyds5-00057Y-1i for qemu-devel@nongnu.org; Tue, 17 Nov 2015 05:52:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zyds4-00057H-Sa for qemu-devel@nongnu.org; Tue, 17 Nov 2015 05:52:20 -0500 References: <1447754381-29882-1-git-send-email-pbonzini@redhat.com> <564B0150.7030400@redhat.com> <564B046F.50205@redhat.com> <564B04D5.4000605@redhat.com> From: Laszlo Ersek Message-ID: <564B06E1.9000902@redhat.com> Date: Tue, 17 Nov 2015 11:52:17 +0100 MIME-Version: 1.0 In-Reply-To: <564B04D5.4000605@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 , Peter Maydell Cc: QEMU Developers On 11/17/15 11:43, Paolo Bonzini wrote: > > > On 17/11/2015 11:41, Laszlo Ersek wrote: >>> If and when this happens we will add "-fno-strict-overflow" for clang, >>> just like we are using "-fno-strict-aliasing" already. >> >> How about adding "-fwrapv -fno-strict-overflow" right now? (Spelling out >> the latter of those explicitly for pointer arithmetic.) > > If it makes the change to HACKING more palatable, I'm all for it. In general I'm not overly happy about this change :), but, if the consensus is that we simply don't want to worry about this kind of UB in QEMU, then let's actually prevent the compiler from exploiting the standard's lenience, rather than just suppress the warning. Thanks! Laszlo