when negating a negative length.
(CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
* intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
All uses changed.
+ (offset_intervals): Tell GCC not to worry about length overflow
+ when negating a negative length.
* alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
(overrun_check_free): Likewise.
#include <config.h>
#include <setjmp.h>
+#include <intprops.h>
#include "lisp.h"
#include "intervals.h"
#include "buffer.h"
if (length > 0)
adjust_intervals_for_insertion (BUF_INTERVALS (buffer), start, length);
else
- adjust_intervals_for_deletion (buffer, start, -length);
+ {
+ IF_LINT (if (length < - TYPE_MAXIMUM (EMACS_INT)) abort ();)
+ adjust_intervals_for_deletion (buffer, start, -length);
+ }
}
\f
/* Merge interval I with its lexicographic successor. The resulting