From: Victor Do Nascimento <victor.donascimento@arm.com>
To: Nick Clifton <nickc@redhat.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: New error building aarcxh64-opc.c
Date: Thu, 9 Nov 2023 10:05:07 +0000 [thread overview]
Message-ID: <0abae18b-30e5-a080-a887-bd4d5806c3bc@arm.com> (raw)
In-Reply-To: <25485ce0-c3e6-489c-ab37-67eb2e3ee440@redhat.com>
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
>
prev parent reply other threads:[~2023-11-09 10:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 9:57 Nick Clifton
2023-11-09 10:05 ` Victor Do Nascimento [this message]
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=0abae18b-30e5-a080-a887-bd4d5806c3bc@arm.com \
--to=victor.donascimento@arm.com \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).