summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index e556fc86a3b..e139d8cf262 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4643,7 +4643,13 @@ mark_maybe_object (Lisp_Object obj)
bool overflow
= INT_SUBTRACT_WRAPV (offset, LISP_WORD_TAG (type_tag), &offset);
+#if !defined WIDE_EMACS_INT || USE_LSB_TAG
+ /* If we don't use wide integers, then `intptr_t' should always be
+ large enough to not overflow. Furthermore, when using the least
+ significant bits as tag bits, the tag is small enough to not
+ overflow either. */
eassert (!overflow);
+#endif
void *po = (char *) ((intptr_t) (char *) XLP (obj) + offset);
/* If the pointer is in the dump image and the dump has a record