From: Mike Frysinger <vapier@gentoo.org>
To: Sergei Trofimovich <slyich@gmail.com>
Cc: cgen@sourceware.org, Sergei Trofimovich <siarheit@google.com>
Subject: Re: [PATCH] cr16: fix build on gcc-12 (NULL comparison)
Date: Sun, 14 Nov 2021 13:13:54 -0500 [thread overview]
Message-ID: <YZFR4nui9UZNGf3U@vapier> (raw)
In-Reply-To: <20211114174241.2955314-1-slyich@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 790 bytes --]
On 14 Nov 2021 17:42, Sergei Trofimovich via Cgen wrote:
> From: Sergei Trofimovich <siarheit@google.com>
>
> On gcc-12 build fails as:
>
> sim/cr16/interp.c: In function 'lookup_hash':
> sim/cr16/interp.c:89:25: error:
> the comparison will always evaluate as 'true'
> for the address of 'mnimonic' will never be NULL [-Werror=address]
> 89 | if ((h->ops->mnimonic != NULL) &&
> | ^~
>
> 'mnimonic' is a sharr array within ops. It can never be NULL.
>
> While at it renamed 'mnimonic' to 'mnemonic'.
> ---
> sim/cr16/cr16_sim.h | 2 +-
> sim/cr16/interp.c | 5 ++---
> 2 files changed, 3 insertions(+), 4 deletions(-)
this code doesn't exist in cgen. did you mean to send the patch here ?
-mike
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-11-14 18:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-14 17:42 Sergei Trofimovich
2021-11-14 18:13 ` Mike Frysinger [this message]
2021-11-14 18:34 ` Sergei Trofimovich
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=YZFR4nui9UZNGf3U@vapier \
--to=vapier@gentoo.org \
--cc=cgen@sourceware.org \
--cc=siarheit@google.com \
--cc=slyich@gmail.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).