[PATCH] cr16: fix build on gcc-12 (NULL comparison)

Mike Frysinger vapier@gentoo.org
Sun Nov 14 18:13:54 GMT 2021


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/cgen/attachments/20211114/696ea600/attachment.sig>


More information about the Cgen mailing list