changeset 39779:15e432be013a

(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.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 11 Oct 2001 19:13:20 +0000
parents 939f548d08cd
children 20d3b87f7a2d
files src/lisp.h
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lisp.h	Thu Oct 11 17:26:04 2001 +0000
+++ b/src/lisp.h	Thu Oct 11 19:13:20 2001 +0000
@@ -477,7 +477,8 @@
 /* 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.  */