From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1ue2-00021F-GS for qemu-devel@nongnu.org; Thu, 26 Nov 2015 06:23:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1udy-00064i-JF for qemu-devel@nongnu.org; Thu, 26 Nov 2015 06:23:22 -0500 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:33157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1udy-00064X-Dn for qemu-devel@nongnu.org; Thu, 26 Nov 2015 06:23:18 -0500 Received: by wmec201 with SMTP id c201so26578870wme.0 for ; Thu, 26 Nov 2015 03:23:17 -0800 (PST) Sender: Paolo Bonzini References: <1448471956-66873-1-git-send-email-pbonzini@redhat.com> <5656E194.10609@redhat.com> From: Paolo Bonzini Message-ID: <5656EBA3.90703@redhat.com> Date: Thu, 26 Nov 2015 12:23:15 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers On 26/11/2015 11:56, Peter Maydell wrote: > On 26 November 2015 at 10:40, Paolo Bonzini wrote: >> >> >> On 26/11/2015 10:46, Peter Maydell wrote: >>> I definitely don't think we should apply the -fwrapv patch yet; >>> would you mind respinning this pullrequest without it? >> >> In what way does that patch make that thing worse? > > It makes a claim about the semantics that the compiler > guarantees us which isn't currently valid. (Or > alternatively, it's implicitly claiming that clang isn't > a supported compiler, which isn't true.) I don't think > we should document or rely on signed-shift semantics But we are relying on them, and thus we should document them. Witness the number of patches fixing so called "undefined" behavior. And those patches are _dangerous_. I can certainly remove the "as documented by the GCC manual" part and the -fwrapv setting, but silencing -Wshift-negative-value and documenting what we rely on should go in. Paolo > until we have the relevant documented promises from the > compiler developers that that is what they are providing. > (I'm happy that the gcc folks have provided those promises, they > just need to actually document them in the -fwrapv option > docs. The clang folks haven't replied yet so we don't know.)