qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 12/31] tcg: Move TCG_TYPE_COUNT outside enum


From: Richard Henderson
Subject: [PATCH 12/31] tcg: Move TCG_TYPE_COUNT outside enum
Date: Thu, 20 Oct 2022 21:52:23 +1000

The count is not itself an enumerator.  Move it outside to
prevent the compiler from considering it with -Wswitch-enum.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 include/tcg/tcg.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index afa18986b1..a631e0bc80 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -294,8 +294,6 @@ typedef enum TCGType {
     TCG_TYPE_V128,
     TCG_TYPE_V256,
 
-    TCG_TYPE_COUNT, /* number of different types */
-
     /* An alias for the size of the host register.  */
 #if TCG_TARGET_REG_BITS == 32
     TCG_TYPE_REG = TCG_TYPE_I32,
@@ -318,6 +316,9 @@ typedef enum TCGType {
 #endif
 } TCGType;
 
+/* Number of different types */
+#define TCG_TYPE_COUNT  (TCG_TYPE_V256 + 1)
+
 /**
  * get_alignment_bits
  * @memop: MemOp value
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]