mirror of
https://github.com/lua/lua.git
synced 2026-06-07 23:53:48 +00:00
Stricter test for use of '__builtin_expect'
GCC introduced this macro in version 3.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user