diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-07-27 13:32:59 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-07-27 13:32:59 -0300 |
commit | 0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b (patch) | |
tree | 0ac634fed90877130b1f102bf4075af999de2158 /lopcodes.h | |
parent | 15231d4fb2f6984b25e0353ff46eda1a180b686d (diff) | |
download | lua-0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b.tar.gz lua-0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b.tar.bz2 lua-0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b.zip |
Added gcc option '-Wconversion'
No warnings for standard numerical types. Still pending alternative
numerical types.
Diffstat (limited to 'lopcodes.h')
-rw-r--r-- | lopcodes.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -72,8 +72,11 @@ enum OpMode {iABC, ivABC, iABx, iAsBx, iAx, isJ}; | |||
72 | ** so they must fit in ints. | 72 | ** so they must fit in ints. |
73 | */ | 73 | */ |
74 | 74 | ||
75 | /* Check whether type 'int' has at least 'b' bits ('b' < 32) */ | 75 | /* |
76 | #define L_INTHASBITS(b) ((UINT_MAX >> ((b) - 1)) >= 1) | 76 | ** Check whether type 'int' has at least 'b' + 1 bits. |
77 | ** 'b' < 32; +1 for the sign bit. | ||
78 | */ | ||
79 | #define L_INTHASBITS(b) ((UINT_MAX >> (b)) >= 1) | ||
77 | 80 | ||
78 | 81 | ||
79 | #if L_INTHASBITS(SIZE_Bx) | 82 | #if L_INTHASBITS(SIZE_Bx) |