void
assert_minus(intmax_t a, intmax_t b, intmax_t r)
{
/* special case subtraction of INTMAX_MIN */
if ((a >= 0 && b < 0 && r <= 0) ||
if (b == INTMAX_MIN && a < 0)
(a < 0 && b > 0 && r >= 0))
errx(ERR_EXIT, "overflow");
/* check addition of negative subtrahend */
assert_plus(a, -b, r);
}
struct val *