From 26be27459b11feabed52cf40aaa76f86c7edc977 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 23 Sep 2022 11:08:10 -0300 Subject: Negation in constant folding of '>>' may overflow --- lvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lvm.c') diff --git a/lvm.c b/lvm.c index 614df055..73a19ba9 100644 --- a/lvm.c +++ b/lvm.c @@ -765,12 +765,10 @@ lua_Number luaV_modf (lua_State *L, lua_Number m, lua_Number n) { /* number of bits in an integer */ #define NBITS cast_int(sizeof(lua_Integer) * CHAR_BIT) + /* ** Shift left operation. (Shift right just negates 'y'.) */ -#define luaV_shiftr(x,y) luaV_shiftl(x,intop(-, 0, y)) - - lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y) { if (y < 0) { /* shift right? */ if (y <= -NBITS) return 0; -- cgit v1.2.3-55-g6feb