* src/data.c (arith_driver): Streamline fixnum division a bit
more, and add a comment about why overflow is impossible.
This responds to a private comment by Stefan Monnier.
/* Set ACCUM to the next operation's result if it fits,
else exit the loop. */
- bool overflow = false;
+ bool overflow;
intmax_t a;
switch (code)
{
case Adiv:
if (next == 0)
xsignal0 (Qarith_error);
- eassert (! INT_DIVIDE_OVERFLOW (accum, next));
- a = accum / next;
- break;
+ /* This cannot overflow, as integer overflow can
+ occur only if the dividend is INTMAX_MIN, but
+ INTMAX_MIN < MOST_NEGATIVE_FIXNUM <= accum. */
+ accum /= next;
+ continue;
case Alogand: accum &= next; continue;
case Alogior: accum |= next; continue;
case Alogxor: accum ^= next; continue;