From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1flk-0001Ie-0U for qemu-devel@nongnu.org; Wed, 25 Nov 2015 14:30:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1flf-0001pM-1E for qemu-devel@nongnu.org; Wed, 25 Nov 2015 14:30:19 -0500 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:35700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1fle-0001pD-Qe for qemu-devel@nongnu.org; Wed, 25 Nov 2015 14:30:14 -0500 Received: by wmuu63 with SMTP id u63so151171854wmu.0 for ; Wed, 25 Nov 2015 11:30:14 -0800 (PST) Sender: Paolo Bonzini References: <1448471956-66873-1-git-send-email-pbonzini@redhat.com> <1448471956-66873-3-git-send-email-pbonzini@redhat.com> <5655F4CB.10509@redhat.com> From: Paolo Bonzini Message-ID: <56560C43.6070105@redhat.com> Date: Wed, 25 Nov 2015 20:30:11 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 2/9] 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 Cc: QEMU Developers On 25/11/2015 20:18, Peter Maydell wrote: > And LLVM is its own project and its developers don't always exactly > follow gcc behaviour. True. The patch docuuments that if LLVM will not respect 2s complement for signed shifts when passed the -fwrapv option, it will not be supported for compilation of QEMU. But let;s cross that bridge when we reach it. So far, -Wshift-negative-value seems to be a misguided attempt to copy GCC's warning without understanding it. > Your latest patch at https://gcc.gnu.org/ml/gcc-patches/2015-11/msg03055.html > doesn't seem to touch the documentation of -fwrapv at all, so I > don't think it is sufficient to allow users of the compiler > to say "-fwrapv means signed behaviour for shifts". GCC *always* does signed behavior for shifts, even without -fwrapv. I'll commit tomorrow the patch that promises that for the future. GCC does not need -fwrapv at all. Paolo