* New error building aarcxh64-opc.c
@ 2023-11-09 9:57 Nick Clifton
2023-11-09 10:05 ` Victor Do Nascimento
0 siblings, 1 reply; 2+ messages in thread
From: Nick Clifton @ 2023-11-09 9:57 UTC (permalink / raw)
To: Victor Do Nascimento; +Cc: Binutils
Hi Victor,
I have run across a build error compiling aarch64-opc.c:
make[3]: Entering directory 'opcodes'
CC aarch64-opc.lo
opcodes/aarch64-opc.c:5040:8: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand]
|| CPENC (3,0,13,0,6))
^ ~~~~~~~~~~~~~~~~~~
opcodes/aarch64-opc.c:5040:8: note: use '|' for a bitwise operation
|| CPENC (3,0,13,0,6))
^~
|
This only happens if you compile with Clang rather than gcc,
which is why I expect that the problem was not noticed before.
I took a quick look at the code concerned and it appears that
there might be a typo:
if ((reg_value == CPENC (3,0,13,0,3)
|| CPENC (3,0,13,0,6))
&& AARCH64_CPU_HAS_FEATURE (features, THE))
return true;
Presumably the second check should be comparing "reg_value == CPENC (3,0,13,0,6)" ?
Anyway, please can you take a look and fix as necessary ?
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: New error building aarcxh64-opc.c
2023-11-09 9:57 New error building aarcxh64-opc.c Nick Clifton
@ 2023-11-09 10:05 ` Victor Do Nascimento
0 siblings, 0 replies; 2+ messages in thread
From: Victor Do Nascimento @ 2023-11-09 10:05 UTC (permalink / raw)
To: Nick Clifton; +Cc: Binutils
Dear Nick,
Oh dear, how embarrassing!
If it only happens when compiled with Clang, then maybe I can be
forgiven just this once :).
Looking at it now (and also looking at how I can add Clang to my testing
procedures to hopefully pick this sort of thing up sooner).
Many thanks for bringing this to my attention.
Best regards,
Victor
On 11/9/23 09:57, Nick Clifton wrote:
> Hi Victor,
>
> I have run across a build error compiling aarch64-opc.c:
>
> make[3]: Entering directory 'opcodes'
> CC aarch64-opc.lo
> opcodes/aarch64-opc.c:5040:8: error: use of logical '||' with constant
> operand [-Werror,-Wconstant-logical-operand]
> || CPENC (3,0,13,0,6))
> ^ ~~~~~~~~~~~~~~~~~~
> opcodes/aarch64-opc.c:5040:8: note: use '|' for a bitwise operation
> || CPENC (3,0,13,0,6))
> ^~
> |
>
> This only happens if you compile with Clang rather than gcc,
> which is why I expect that the problem was not noticed before.
>
> I took a quick look at the code concerned and it appears that
> there might be a typo:
>
> if ((reg_value == CPENC (3,0,13,0,3)
> || CPENC (3,0,13,0,6))
> && AARCH64_CPU_HAS_FEATURE (features, THE))
> return true;
>
> Presumably the second check should be comparing "reg_value == CPENC
> (3,0,13,0,6)" ?
>
> Anyway, please can you take a look and fix as necessary ?
>
> Cheers
> Nick
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-09 10:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-09 9:57 New error building aarcxh64-opc.c Nick Clifton
2023-11-09 10:05 ` Victor Do Nascimento
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 read-only IMAP folder(s) and NNTP newsgroup(s).