aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-07-27 13:32:59 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-07-27 13:32:59 -0300
commit0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b (patch)
tree0ac634fed90877130b1f102bf4075af999de2158 /lopcodes.h
parent15231d4fb2f6984b25e0353ff46eda1a180b686d (diff)
downloadlua-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.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lopcodes.h b/lopcodes.h
index 736946e3..31f6fac0 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -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)