@@ -213,7 +213,9 @@ typedef void(*func)(VM*, VAL*);
213213
214214typedef intptr_t i_int;
215215
216−#define MKINT(x) ((void*)((i_int)(((x)<<1)+1)))
216+// Shifting a negative number left is undefined and (rightly) gives a warning,
217+// but we're only interested in shifting the bit pattern, so cast it
218+#define MKINT(x) ((void*)((i_int)((((uintptr_t)x)<<1)+1)))
217219#define GETINT(x) ((i_int)(x)>>1)
218220#define ISINT(x) ((((i_int)x)&1) == 1)
219221#define ISSTR(x) (GETTY(x) == CT_STRING)