aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto I <roberto@inf.puc-rio.br>2026-04-01 15:09:07 -0300
committerRoberto I <roberto@inf.puc-rio.br>2026-04-01 15:09:07 -0300
commitc037162a1a657088d722f550e287015525bb2259 (patch)
tree004b52bdd5fdb7d46aa65a57bb6bc888f3d86681
parentefddc2309c5ff8a1842bea8a9c0d7d4a5d6e1e60 (diff)
downloadlua-master.tar.gz
lua-master.tar.bz2
lua-master.zip
Stricter test for use of '__builtin_expect'HEADmaster
GCC introduced this macro in version 3.
-rw-r--r--luaconf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/luaconf.h b/luaconf.h
index 5ac9d988..0a71370f 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -664,7 +664,7 @@
664*/ 664*/
665#if !defined(luai_likely) 665#if !defined(luai_likely)
666 666
667#if defined(__GNUC__) && !defined(LUA_NOBUILTIN) 667#if !defined(LUA_NOBUILTIN) && defined(__GNUC__) && (__GNUC__ >= 3)
668#define luai_likely(x) (__builtin_expect(((x) != 0), 1)) 668#define luai_likely(x) (__builtin_expect(((x) != 0), 1))
669#define luai_unlikely(x) (__builtin_expect(((x) != 0), 0)) 669#define luai_unlikely(x) (__builtin_expect(((x) != 0), 0))
670#else 670#else