aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-05-22 00:12:24 -0700
committerPaul Eggert2011-05-22 00:12:24 -0700
commit2e6578fb5e17cef7505aa9a1e76332c3b9eddd30 (patch)
tree471ba291a67c869042ebec023d152224a1a1ba2f /src
parent0ae6bdee0085b05028108325b0a4ce979eadb24e (diff)
downloademacs-2e6578fb5e17cef7505aa9a1e76332c3b9eddd30.tar.gz
emacs-2e6578fb5e17cef7505aa9a1e76332c3b9eddd30.zip
* lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/lisp.h5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5518531bea8..67eaa09bf02 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12011-05-22 Paul Eggert <eggert@cs.ucla.edu>
2
3 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
4
12011-05-21 Paul Eggert <eggert@cs.ucla.edu> 52011-05-21 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 * data.c: Avoid integer truncation in expressions involving floats. 7 * data.c: Avoid integer truncation in expressions involving floats.
diff --git a/src/lisp.h b/src/lisp.h
index b2beeffa79e..6618a754145 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -544,11 +544,10 @@ extern Lisp_Object make_number (EMACS_INT);
544 544
545/* Value is non-zero if I doesn't fit into a Lisp fixnum. It is 545/* Value is non-zero if I doesn't fit into a Lisp fixnum. It is
546 written this way so that it also works if I is of unsigned 546 written this way so that it also works if I is of unsigned
547 type. */ 547 type or if I is a NaN. */
548 548
549#define FIXNUM_OVERFLOW_P(i) \ 549#define FIXNUM_OVERFLOW_P(i) \
550 ((i) > MOST_POSITIVE_FIXNUM \ 550 (! ((0 <= (i) || MOST_NEGATIVE_FIXNUM <= (i)) && (i) <= MOST_POSITIVE_FIXNUM))
551 || ((i) < 0 && (i) < MOST_NEGATIVE_FIXNUM))
552 551
553/* Extract a value or address from a Lisp_Object. */ 552/* Extract a value or address from a Lisp_Object. */
554 553