From ea2715aa75d0db61fe6a48ed790fd49eeb209490 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Fri, 24 Mar 2023 23:54:49 +0100 Subject: [PATCH] Remove static assert. Some old compilers failed to simplify into a constant expression, resulting in build failure --- m-core.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/m-core.h b/m-core.h index 1afa3502..654bd325 100644 --- a/m-core.h +++ b/m-core.h @@ -80,11 +80,8 @@ # define M_ASSUME(x) M_ASSERT(x) #elif defined(__GNUC__) \ && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 -/* We test that the argument can properly be converted into a constant expression */ # define M_ASSUME(x) \ - (M_STATIC_ASSERT( __builtin_constant_p (!!(x) || !(x)), \ - M_LIB_NOT_A_CONSTANT, "Argument doesn't evaluate to a constant: " M_ASTR(x) ), \ - (x) ? (void) 0 : __builtin_unreachable()) + ( (x) ? (void) 0 : __builtin_unreachable()) #elif defined(_MSC_VER) # define M_ASSUME(x) __assume(x) #else