qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	QEMU Trivial <qemu-trivial@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Remove left shifts of negative signed integers
Date: Thu, 30 Jun 2016 16:13:47 -0400	[thread overview]
Message-ID: <39d39e44-7590-857c-e487-eea148b4b5a3@redhat.com> (raw)
In-Reply-To: <CAFEAcA-mbSO_3OcUma98qFsnsc-tPtOot0GizFNq6+5sSPyftw@mail.gmail.com>



On 06/30/2016 04:11 PM, Peter Maydell wrote:
> On 30 June 2016 at 20:36, John Snow <jsnow@redhat.com> wrote:
>> Another exercise in placating Clang's increasingly strict -Werror mode.
>> Technically, this is undefined behavior. In practice, -N<<M is the same
>> as -(N<<M).
>>
>> Signed-off-by: John Snow <jsnow@redhat.com>
>> ---
>>  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<<OPL_OUTSB)
>> -#define OPL_MINOUT (-0x8000<<OPL_OUTSB)
>> +#define OPL_MINOUT (-(0x8000<<OPL_OUTSB))
> 
> 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

  reply	other threads:[~2016-06-30 20:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30 19:36 [Qemu-devel] [PATCH] Remove left shifts of negative signed integers John Snow
2016-06-30 20:11 ` Peter Maydell
2016-06-30 20:13   ` John Snow [this message]
2016-06-30 20:16     ` Paolo Bonzini
2016-06-30 20:15 ` Paolo Bonzini
2016-06-30 20:20   ` John Snow
2016-06-30 20:32     ` Paolo Bonzini
2016-08-16 14:00   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39d39e44-7590-857c-e487-eea148b4b5a3@redhat.com \
    --to=jsnow@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).