From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIiLT-00045r-0w for qemu-devel@nongnu.org; Thu, 30 Jun 2016 16:13:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIiLN-00072K-UR for qemu-devel@nongnu.org; Thu, 30 Jun 2016 16:13:53 -0400 References: <1467315396-3628-1-git-send-email-jsnow@redhat.com> From: John Snow Message-ID: <39d39e44-7590-857c-e487-eea148b4b5a3@redhat.com> Date: Thu, 30 Jun 2016 16:13:47 -0400 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Remove left shifts of negative signed integers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , QEMU Trivial , Paolo Bonzini , Gerd Hoffmann On 06/30/2016 04:11 PM, Peter Maydell wrote: > On 30 June 2016 at 20:36, John Snow wrote: >> Another exercise in placating Clang's increasingly strict -Werror mode. >> Technically, this is undefined behavior. In practice, -N<> as -(N<> >> Signed-off-by: John Snow >> --- >> hw/audio/fmopl.c | 2 +- >> target-i386/monitor.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c >> index 731110f..de9338b 100644 >> --- a/hw/audio/fmopl.c >> +++ b/hw/audio/fmopl.c >> @@ -69,7 +69,7 @@ static int opl_dbg_maxchip,opl_dbg_chip; >> /* final output shift , limit minimum and maximum */ >> #define OPL_OUTSB (TL_BITS+3-16) /* OPL output final shift 16bit */ >> #define OPL_MAXOUT (0x7fff<> -#define OPL_MINOUT (-0x8000<> +#define OPL_MINOUT (-(0x8000< > We have been down this path before: > http://patchwork.ozlabs.org/patch/545238/ > > Paolo will doubtless be along with the rant shortly. > > -- PMM > I figured, so I CC'd him. Nobody can say I didn't try. --js