[PATCH] cr16: fix build on gcc-12 (NULL comparison)
Sergei Trofimovich
slyich@gmail.com
Sun Nov 14 18:34:14 GMT 2021
On Sun, 14 Nov 2021 13:13:54 -0500
Mike Frysinger <vapier@gentoo.org> wrote:
> 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
My fault of not being able to read binutils-gdb/MAINTAINERS file.
I somehow read 'cgen/; cgen parts of opcodes/, sim/' as "all of sim/"
goes here.
Will resend to gdb-patches@sourceware.org.
Thank you!
--
Sergei
More information about the Cgen
mailing list