From 279c3a6961c60252f0368fdea889caf977f85fe0 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 13 May 2019 16:17:21 -0300 Subject: A few changes in tests about number of bits in integers - The preprocessor must work with at least 'long', and therefore must do shifts of up to 31 bits correctly. - Whenever possible, use unsigned types in shifts. --- luaconf.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'luaconf.h') diff --git a/luaconf.h b/luaconf.h index 4647ba17..e6271b80 100644 --- a/luaconf.h +++ b/luaconf.h @@ -87,9 +87,8 @@ /* @@ LUAI_IS32INT is true iff 'int' has (at least) 32 bits. -** (the use of two shifts avoids undefined shifts) */ -#define LUAI_IS32INT (((UINT_MAX >> 15) >> 15) >= 3) +#define LUAI_IS32INT ((UINT_MAX >> 30) >= 3) /* }================================================================== */ -- cgit v1.2.3-55-g6feb