fpu/softfloat.c: error: bitwise negation of a boolean expression
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Last time I built QEMU was on commit d5c75ec500d96f1
I just pulled to fea8f3ed739536f
CC lm32-softmmu/
fpu/softfloat.
absZ &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );
!
fpu/softfloat.
absZ0 &= ~ ( ( (uint64_t) ( absZ1<<1 ) == 0 ) & roundNearestEven );
!
fpu/softfloat.
absZ0 &= ~(((uint64_
!
fpu/softfloat.
zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );
!
fpu/softfloat.
zSig &= ~ ( ( ( roundBits ^ 0x200 ) == 0 ) & roundNearestEven );
!
fpu/softfloat.
fpu/softfloat.
zSig0 &= ~ ( ( (uint64_t) ( zSig1<<1 ) == 0 ) & roundNearestEven );
fpu/softfloat.
zSig1 &= ~ ( ( zSig2 + zSig2 == 0 ) & roundNearestEven );
!
8 errors generated.
$ clang -v
clang version 10.0.0-4ubuntu1
Target: aarch64-
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
Changed in qemu: | |
status: | New → In Progress |
Changed in qemu: | |
status: | Fix Committed → Fix Released |
On Wed, 27 May 2020 at 20:21, Philippe Mathieu-Daudé d93447f990cd5a4 ef5ba27fae, ca027cf56af7f55 76f37ef9cd and now get: fpu/softfloat. o c:3365: 13: error: bitwise negation of a boolean expression; did you mean logical negation? [-Werror, -Wbool- operation] ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~
<email address hidden> wrote:
>
> Public bug reported:
>
> Last time I built QEMU was on commit d5c75ec500d96f1
> I just pulled to fea8f3ed739536f
>
> CC lm32-softmmu/
> fpu/softfloat.
> absZ &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );
> ^~~~~~~
> !
"(x & y)" is not a boolean expression, so we should report this to clang
as a bug (I assume what they actually are trying to complain about is
bitwise AND with a boolean expression).
thanks
-- PMM