1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 20:30:28 +02:00

VM: Redefine INUM_MIN and INUM_MAX without assumptions.

* libguile/vm-i-scheme.c (INUM_MIN, INUM_MAX): Redefine to avoid
  assumptions about the representation of inums.
This commit is contained in:
Mark H Weaver 2013-08-01 14:01:58 -04:00
parent 00472a22bb
commit 478fa0d530

View file

@ -207,8 +207,10 @@ VM_DEFINE_FUNCTION (149, ge, "ge?", 2)
/* The maximum/minimum tagged integers. */
#undef INUM_MAX
#undef INUM_MIN
#define INUM_MAX (INTPTR_MAX - 1)
#define INUM_MIN (INTPTR_MIN + scm_tc2_int)
#define INUM_MAX \
((scm_t_signed_bits) SCM_UNPACK (SCM_I_MAKINUM (SCM_MOST_POSITIVE_FIXNUM)))
#define INUM_MIN \
((scm_t_signed_bits) SCM_UNPACK (SCM_I_MAKINUM (SCM_MOST_NEGATIVE_FIXNUM)))
#undef FUNC2
#define FUNC2(CFUNC,SFUNC) \