qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Bug 1655708] [NEW] target/ppc/int_helper.c:2806: stran


From: Thomas Huth
Subject: Re: [Qemu-devel] [Bug 1655708] [NEW] target/ppc/int_helper.c:2806: strange expression ?
Date: Wed, 11 Jan 2017 18:19:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]