From: Gerd Moellmann Date: Thu, 11 Oct 2001 19:13:20 +0000 (+0000) Subject: (FIXNUM_OVERFLOW_P): Cast I to EMACS_INT in comparisons X-Git-Tag: ttn-vms-21-2-B4~19573 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fb756c1cd751b18f447874a28f6170edc97ce2bd;p=emacs.git (FIXNUM_OVERFLOW_P): Cast I to EMACS_INT in comparisons in case I is of some unsigned type, in which case MOST_NEGATIVE_FIXNUM will be converted to unsigned, and the comparison becomes bogus. --- diff --git a/src/lisp.h b/src/lisp.h index e51f2f64e56..5daac90571a 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -477,7 +477,8 @@ extern Lisp_Object make_number (); /* Value is non-zero if C integer I doesn't fit into a Lisp fixnum. */ #define FIXNUM_OVERFLOW_P(i) \ - ((i) > MOST_POSITIVE_FIXNUM || (i) < MOST_NEGATIVE_FIXNUM) + ((EMACS_INT)(i) > MOST_POSITIVE_FIXNUM \ + || (EMACS_INT) (i) < MOST_NEGATIVE_FIXNUM) /* Extract a value or address from a Lisp_Object. */