From 3ba2114043d50705ba2f33b01ef17b56122629ac Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Tue, 18 Dec 2018 03:53:55 -0500 Subject: [PATCH] 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. Backports commit 6fa2cef205a60b5c5c3b058f53852416b885c455 from qemu --- qemu/tcg/tcg.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qemu/tcg/tcg.h b/qemu/tcg/tcg.h index 0c410e19..fa88c2d1 100644 --- a/qemu/tcg/tcg.h +++ b/qemu/tcg/tcg.h @@ -232,11 +232,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 {