public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Michael Frysinger <vapier@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] sim: warnings: disable -Wenum-conversion fow now [PR sim/29752]
Date: Thu,  7 Dec 2023 13:00:56 +0000 (GMT)	[thread overview]
Message-ID: <20231207130056.BC945385DC07@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a72924552626025ad0ad032edc7f02ea345fd2b5

commit a72924552626025ad0ad032edc7f02ea345fd2b5
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Wed Dec 6 21:16:17 2023 -0700

    sim: warnings: disable -Wenum-conversion fow now [PR sim/29752]
    
    The cgen code mixes virtual insn enums with insn enums, and there isn't
    an obvious (to me) way to unravel this atm, so disable the warning.
    
    sim/lm32/decode.c:45:5: error:
            implicit conversion from enumeration type 'CGEN_INSN_VIRTUAL_TYPE'
            to different enumeration type 'CGEN_INSN_TYPE' (aka 'enum cgen_insn_type')
            [-Werror,-Wenum-conversion]
       45 |   { VIRTUAL_INSN_X_INVALID, LM32BF_INSN_X_INVALID, LM32BF_SFMT_EMPTY },
          |   ~ ^~~~~~~~~~~~~~~~~~~~~~
    
    Bug: https://sourceware.org/PR29752

Diff:
---
 sim/configure                    | 1 +
 sim/m4/sim_ac_option_warnings.m4 | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/sim/configure b/sim/configure
index 79a21e8be64..7ed9834df39 100755
--- a/sim/configure
+++ b/sim/configure
@@ -15842,6 +15842,7 @@ build_warnings="$build_warnings
 -Wold-style-declaration
 -Wold-style-definition
 -Wpointer-sign
+-Wno-enum-conversion
 "
 
 case "${host}" in
diff --git a/sim/m4/sim_ac_option_warnings.m4 b/sim/m4/sim_ac_option_warnings.m4
index e453d8866ff..52beee86c02 100644
--- a/sim/m4/sim_ac_option_warnings.m4
+++ b/sim/m4/sim_ac_option_warnings.m4
@@ -64,6 +64,9 @@ build_warnings="$build_warnings
 -Wold-style-declaration
 -Wold-style-definition
 -Wpointer-sign
+dnl The cgen virtual insn logic involves enum conversions.
+dnl Disable until we can figure out how to make this work.
+-Wno-enum-conversion
 "
 
 case "${host}" in

                 reply	other threads:[~2023-12-07 13:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20231207130056.BC945385DC07@sourceware.org \
    --to=vapier@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /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).