Avoid clang warnings about undefined signed shift behavior
Calls to fixnum(-1) would cause them.
This commit is contained in:
parent
b128aee83d
commit
82e09fa92b
3
flisp.h
3
flisp.h
|
@ -6,6 +6,7 @@
|
|||
|
||||
typedef uptrint_t value_t;
|
||||
typedef int_t fixnum_t;
|
||||
typedef uint_t ufixnum_t;
|
||||
#ifdef BITS64
|
||||
#define T_FIXNUM T_INT64
|
||||
#else
|
||||
|
@ -52,7 +53,7 @@ typedef struct {
|
|||
#define tag(x) ((x)&0x7)
|
||||
#define ptr(x) ((void *)((x) & (~(value_t)0x7)))
|
||||
#define tagptr(p, t) (((value_t)(p)) | (t))
|
||||
#define fixnum(x) ((value_t)(((fixnum_t)(x)) << 2))
|
||||
#define fixnum(x) ((value_t)(((ufixnum_t)(fixnum_t)(x)) << 2))
|
||||
#define numval(x) (((fixnum_t)(x)) >> 2)
|
||||
#ifdef BITS64
|
||||
#define fits_fixnum(x) (((x) >> 61) == 0 || (~((x) >> 61)) == 0)
|
||||
|
|
Loading…
Reference in New Issue