cast fixes undefined behaviour; closes #1919 in upstream

factor-shell
Cat Stevens 2018-01-27 13:05:07 -05:00 committed by Björn Lindqvist
parent 62f9acdbbc
commit 21cb42edf3
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ inline static fixnum untag_fixnum(cell tagged) {
} }
inline static cell tag_fixnum(fixnum untagged) { 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 #define NO_TYPE_CHECK static const cell type_number = TYPE_COUNT