From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zygcz-0000Pw-U7 for qemu-devel@nongnu.org; Tue, 17 Nov 2015 08:48:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zygcu-0006nn-R8 for qemu-devel@nongnu.org; Tue, 17 Nov 2015 08:48:57 -0500 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:32882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zygcu-0006nh-MA for qemu-devel@nongnu.org; Tue, 17 Nov 2015 08:48:52 -0500 Received: by wmec201 with SMTP id c201so228424997wme.0 for ; Tue, 17 Nov 2015 05:48:52 -0800 (PST) Sender: Paolo Bonzini References: <1447754381-29882-1-git-send-email-pbonzini@redhat.com> <564B0150.7030400@redhat.com> <564B046F.50205@redhat.com> <87h9kkx2dp.fsf@blackfin.pond.sub.org> From: Paolo Bonzini Message-ID: <564B3041.3060702@redhat.com> Date: Tue, 17 Nov 2015 14:48:49 +0100 MIME-Version: 1.0 In-Reply-To: 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: Peter Maydell , Markus Armbruster Cc: Laszlo Ersek , QEMU Developers On 17/11/2015 13:04, Peter Maydell wrote: > > Using -fwrapv means that integer signed overflow is fully defined: > > it wraps. When -fwrapv is used, there is no difference between > > -fstrict-overflow and -fno-strict-overflow for integers. > > I thought this too, but note that it says "for integers". As Laszlo > says, the reason to provide both is to get the -fno-strict-overflow > behaviour for pointer arithmetic, which is not affected by -fwrapv. And ubsan is not affected by -fno-strict-overflow... Paolo