From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTos3-0002EG-78 for qemu-devel@nongnu.org; Mon, 03 Dec 2018 09:09:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTorb-0002Of-Sb for qemu-devel@nongnu.org; Mon, 03 Dec 2018 09:06:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57230) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gTorb-0001li-GP for qemu-devel@nongnu.org; Mon, 03 Dec 2018 09:06:19 -0500 From: Thomas Huth Date: Mon, 3 Dec 2018 15:05:35 +0100 Message-Id: <1543845937-300-6-git-send-email-thuth@redhat.com> In-Reply-To: <1543845937-300-1-git-send-email-thuth@redhat.com> References: <1543845937-300-1-git-send-email-thuth@redhat.com> Subject: [Qemu-devel] [PATCH for-4.0 5/7] tcg/tcg.h: Remove GCC check for tcg_debug_assert() macro List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , pbonzini@redhat.com, peter.maydell@linaro.org Both GCC v4.8 and Clang v3.4 support (our minimum versions) support __builtin_unreachable(), so we can remove the version check here now. Signed-off-by: Thomas Huth --- tcg/tcg.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index f4efbaa..f9a56a9 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 { -- 1.8.3.1