]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: warnings: disable -Wenum-conversion fow now [PR sim/29752]
authorMike Frysinger <vapier@gentoo.org>
Thu, 7 Dec 2023 04:16:17 +0000 (21:16 -0700)
committerMike Frysinger <vapier@gentoo.org>
Thu, 7 Dec 2023 13:00:25 +0000 (06:00 -0700)
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

sim/configure
sim/m4/sim_ac_option_warnings.m4

index 79a21e8be642f8d49b62afbf5d6342e0afb6d0d4..7ed9834df39737f6c33b5c709dd1bef47bd9c871 100755 (executable)
@@ -15842,6 +15842,7 @@ build_warnings="$build_warnings
 -Wold-style-declaration
 -Wold-style-definition
 -Wpointer-sign
+-Wno-enum-conversion
 "
 
 case "${host}" in
index e453d8866ff05daabd4268ea51eeb55fe01c9441..52beee86c02001a233daae6050409b813fe9b173 100644 (file)
@@ -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