~ chicken-core (chicken-5) 97e61d2b5697260654f1fbd3e1c7a3536ee78958
commit 97e61d2b5697260654f1fbd3e1c7a3536ee78958 Author: Peter Bex <peter@more-magic.net> AuthorDate: Wed May 6 20:13:38 2015 +0200 Commit: Peter Bex <peter@more-magic.net> CommitDate: Sun May 31 14:55:25 2015 +0200 Small cleanup: remove unnecessary code in overflow detection in C_a_i_fixnum_plus diff --git a/chicken.h b/chicken.h index 4595a75f..12d32c4a 100644 --- a/chicken.h +++ b/chicken.h @@ -3060,17 +3060,12 @@ C_inline C_word C_a_i_fixnum_difference(C_word **ptr, C_word n, C_word x, C_word C_inline C_word C_a_i_fixnum_plus(C_word **ptr, C_word n, C_word x, C_word y) { - /* Exceptional situation: this will cause a real underflow */ - if (x == C_fix(C_MOST_NEGATIVE_FIXNUM) && y == C_fix(C_MOST_NEGATIVE_FIXNUM)) { - return C_bignum1(ptr, 1, ((C_uword)-C_MOST_NEGATIVE_FIXNUM) << 1); - } else { - C_word z = C_unfix(x) + C_unfix(y); + C_word z = C_unfix(x) + C_unfix(y); - if(!C_fitsinfixnump(z)) { - return C_bignum1(ptr, z < 0, labs(z)); - } else { - return C_fix(z); - } + if(!C_fitsinfixnump(z)) { + return C_bignum1(ptr, z < 0, labs(z)); + } else { + return C_fix(z); } }Trap