diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-05-13 16:17:21 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-05-13 16:17:21 -0300 |
commit | 279c3a6961c60252f0368fdea889caf977f85fe0 (patch) | |
tree | 1614c0b508f34657f81d155dec6dffd92e671479 /luaconf.h | |
parent | 49c42f3615bd876657bf697e3bf040ce796ae238 (diff) | |
download | lua-279c3a6961c60252f0368fdea889caf977f85fe0.tar.gz lua-279c3a6961c60252f0368fdea889caf977f85fe0.tar.bz2 lua-279c3a6961c60252f0368fdea889caf977f85fe0.zip |
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.
Diffstat (limited to 'luaconf.h')
-rw-r--r-- | luaconf.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -87,9 +87,8 @@ | |||
87 | 87 | ||
88 | /* | 88 | /* |
89 | @@ LUAI_IS32INT is true iff 'int' has (at least) 32 bits. | 89 | @@ LUAI_IS32INT is true iff 'int' has (at least) 32 bits. |
90 | ** (the use of two shifts avoids undefined shifts) | ||
91 | */ | 90 | */ |
92 | #define LUAI_IS32INT (((UINT_MAX >> 15) >> 15) >= 3) | 91 | #define LUAI_IS32INT ((UINT_MAX >> 30) >= 3) |
93 | 92 | ||
94 | /* }================================================================== */ | 93 | /* }================================================================== */ |
95 | 94 | ||