From: Thomas Huth Date: Mon, 3 Dec 2018 12:48:19 +0000 (+0100) Subject: tcg/tcg.h: Remove GCC check for tcg_debug_assert() macro X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6fa2cef205a60b5c5c3b058f53852416b885c455;p=qmiga%2Fqemu.git tcg/tcg.h: Remove GCC check for tcg_debug_assert() macro Both GCC v4.8 and Clang v3.4 (our minimum versions) support __builtin_unreachable(), so we can remove the version check here now. Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- diff --git a/tcg/tcg.h b/tcg/tcg.h index f4efbaa680..f9a56a9520 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -230,11 +230,9 @@ typedef uint64_t tcg_insn_unit; #if defined CONFIG_DEBUG_TCG || defined QEMU_STATIC_ANALYSIS # define tcg_debug_assert(X) do { assert(X); } while (0) -#elif QEMU_GNUC_PREREQ(4, 5) +#else # define tcg_debug_assert(X) \ do { if (!(X)) { __builtin_unreachable(); } } while (0) -#else -# define tcg_debug_assert(X) do { (void)(X); } while (0) #endif typedef struct TCGRelocation {