From c037162a1a657088d722f550e287015525bb2259 Mon Sep 17 00:00:00 2001 From: Roberto I Date: Wed, 1 Apr 2026 15:09:07 -0300 Subject: [PATCH] Stricter test for use of '__builtin_expect' GCC introduced this macro in version 3. --- luaconf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luaconf.h b/luaconf.h index 5ac9d988..0a71370f 100644 --- a/luaconf.h +++ b/luaconf.h @@ -664,7 +664,7 @@ */ #if !defined(luai_likely) -#if defined(__GNUC__) && !defined(LUA_NOBUILTIN) +#if !defined(LUA_NOBUILTIN) && defined(__GNUC__) && (__GNUC__ >= 3) #define luai_likely(x) (__builtin_expect(((x) != 0), 1)) #define luai_unlikely(x) (__builtin_expect(((x) != 0), 0)) #else