On 12/6/22 09:28, Ilya Leoshkevich wrote:
+            switch (TCG_TARGET_CALL_ARG_I64) {
+            case TCG_CALL_ARG_EVEN:

On a s390x host with gcc-11.0.1-0.3.1.ibm.fc34.s390x I get:

FAILED: libqemu-aarch64-softmmu.fa.p/tcg_tcg.c.o
../tcg/tcg.c: In function ‘init_call_layout’:
../tcg/tcg.c:739:13: error: case value ‘1’ not in enumerated type 
[-Werror=switch]
   739 |             case TCG_CALL_ARG_EVEN:
       |             ^~~~

The following helps:

Yes, I found and fixed this since.

--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -735,7 +735,7 @@ static void init_call_layout(TCGHelperInfo *info)
              break;
case TCG_TYPE_I64:
-            switch (TCG_TARGET_CALL_ARG_I64) {
+            switch ((TCGCallArgumentKind)TCG_TARGET_CALL_ARG_I64) {
              case TCG_CALL_ARG_EVEN:
                  layout_arg_even(&cum);
                  /* fall through */

This looks like a gcc bug to me.

The gcc "bug" is only in not being sufficiently verbose. It should say something about *differing* enumerated types, and perhaps name them.

Back in patch 20, tcg/s390x/tcg-target.h,

-#define TCG_TARGET_CALL_ARG_I64         TCG_CALL_RET_NORMAL
+#define TCG_TARGET_CALL_ARG_I64         TCG_CALL_ARG_NORMAL


r~

Reply via email to