From 650368f11361f45af429cac9690c9d85885d765c Mon Sep 17 00:00:00 2001 From: Marco Bodrato Date: Sun, 12 Dec 2021 14:24:10 +0100 Subject: Handle overflow in mpz_type through errno. --- errno.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'errno.c') diff --git a/errno.c b/errno.c index b4be55501..d71c146b3 100644 --- a/errno.c +++ b/errno.c @@ -4,7 +4,7 @@ ONLY. THEY'RE ALMOST CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN FUTURE GNU MP RELEASES. -Copyright 2000, 2001, 2003 Free Software Foundation, Inc. +Copyright 2000, 2001, 2003, 2021 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -70,3 +70,8 @@ __gmp_divide_by_zero (void) { __gmp_exception (GMP_ERROR_DIVISION_BY_ZERO); } +void +__gmp_overflow_in_mpz (void) +{ + __gmp_exception (GMP_ERROR_MPZ_OVERFLOW); +} -- cgit v1.2.1