diff mbox series

[for-4.0,5/7] tcg/tcg.h: Remove GCC check for tcg_debug_assert() macro

Message ID 1543845937-300-6-git-send-email-thuth@redhat.com
State New
Headers show
Series Assume GCC v4.8 and Clang v3.4 as minimum compiler versions | expand

Commit Message

Thomas Huth Dec. 3, 2018, 2:05 p.m. UTC
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 <thuth@redhat.com>
---
 tcg/tcg.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Richard Henderson Dec. 3, 2018, 4:13 p.m. UTC | #1
On 12/3/18 8:05 AM, Thomas Huth wrote:
> 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 <thuth@redhat.com>
> ---
>  tcg/tcg.h | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

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 {