From 21cb42edf3d91a4be40af5c79cfc1d53e3a0abff Mon Sep 17 00:00:00 2001 From: Cat Stevens Date: Sat, 27 Jan 2018 13:05:07 -0500 Subject: [PATCH] cast fixes undefined behaviour; closes #1919 in upstream --- vm/layouts.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/layouts.hpp b/vm/layouts.hpp index 7975f4ca92..e60201ed5d 100644 --- a/vm/layouts.hpp +++ b/vm/layouts.hpp @@ -104,7 +104,7 @@ inline static fixnum untag_fixnum(cell tagged) { } inline static cell tag_fixnum(fixnum untagged) { - return (untagged << TAG_BITS) | FIXNUM_TYPE; + return ( (cell)untagged << TAG_BITS) | FIXNUM_TYPE; } #define NO_TYPE_CHECK static const cell type_number = TYPE_COUNT -- 2.34.1