qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Eric Blake <eblake@redhat.com>,
	Bug 1655708 <1655708@bugs.launchpad.net>,
	qemu-devel@nongnu.org,
	Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Cc: qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1655708] [NEW] target/ppc/int_helper.c:2806: strange expression ?
Date: Wed, 11 Jan 2017 18:19:00 +0100	[thread overview]
Message-ID: <b53ded52-f5ca-43f8-321e-1a2617471510@redhat.com> (raw)
In-Reply-To: <4fc41772-1607-7e55-ffa1-80e3579b964d@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

On 11.01.2017 18:12, Eric Blake wrote:
> On 01/11/2017 10:41 AM, dcb wrote:
>> so I think the compiler warning is for the i * 2 lhs of the ?.
> 
> Yes - the compiler is complaining that 'i * 2' can only be non-zero if
> 'i' was non-zero (given that the code occurs in a loop for i between 0
> and 16), so it is just as easy to write 'i ? ...' instead of the weirder
> '(i * 2) ? ...'.

... unless something like (i & 2) was meant instead?
Maybe Jose (who wrote that code) could comment on this?

 Thomas




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2017-01-11 17:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 16:41 [Qemu-devel] [Bug 1655708] [NEW] target/ppc/int_helper.c:2806: strange expression ? dcb
2017-01-11 17:12 ` Eric Blake
2017-01-11 17:19   ` Thomas Huth [this message]
2017-01-11 18:01   ` joserz
2017-01-11 18:53 ` [Qemu-devel] [Bug 1655708] " Jose R. Ziviani
2017-01-11 20:09 ` dcb
2017-01-18 15:44 ` Thomas Huth
2017-07-20 12:44 ` Thomas Huth

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=b53ded52-f5ca-43f8-321e-1a2617471510@redhat.com \
    --to=thuth@redhat.com \
    --cc=1655708@bugs.launchpad.net \
    --cc=eblake@redhat.com \
    --cc=joserz@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).