diff options
| author | Gerd Moellmann | 2001-10-11 19:13:20 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-10-11 19:13:20 +0000 |
| commit | fb756c1cd751b18f447874a28f6170edc97ce2bd (patch) | |
| tree | bc40916195a4ccdf24b935188ca5691067e6bca8 /src/lisp.h | |
| parent | 63ca0a6ee4472973bf73ab75979d164d2d157a61 (diff) | |
| download | emacs-fb756c1cd751b18f447874a28f6170edc97ce2bd.tar.gz emacs-fb756c1cd751b18f447874a28f6170edc97ce2bd.zip | |
(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.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 3 |
1 files changed, 2 insertions, 1 deletions
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 (); | |||
| 477 | /* Value is non-zero if C integer I doesn't fit into a Lisp fixnum. */ | 477 | /* Value is non-zero if C integer I doesn't fit into a Lisp fixnum. */ |
| 478 | 478 | ||
| 479 | #define FIXNUM_OVERFLOW_P(i) \ | 479 | #define FIXNUM_OVERFLOW_P(i) \ |
| 480 | ((i) > MOST_POSITIVE_FIXNUM || (i) < MOST_NEGATIVE_FIXNUM) | 480 | ((EMACS_INT)(i) > MOST_POSITIVE_FIXNUM \ |
| 481 | || (EMACS_INT) (i) < MOST_NEGATIVE_FIXNUM) | ||
| 481 | 482 | ||
| 482 | /* Extract a value or address from a Lisp_Object. */ | 483 | /* Extract a value or address from a Lisp_Object. */ |
| 483 | 484 | ||