diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2021-12-12 14:24:10 +0100 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2021-12-12 14:24:10 +0100 |
commit | 650368f11361f45af429cac9690c9d85885d765c (patch) | |
tree | 06411f3152ec58173e1bd8fb0d6327f68ad3f78f /gmp-impl.h | |
parent | 5ea34d9f6fd6ebe37653ea64dac820e05cb160d5 (diff) | |
download | gmp-650368f11361f45af429cac9690c9d85885d765c.tar.gz |
Handle overflow in mpz_type through errno.
Diffstat (limited to 'gmp-impl.h')
-rw-r--r-- | gmp-impl.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gmp-impl.h b/gmp-impl.h index 2b6d7e9e9..60d7ee345 100644 --- a/gmp-impl.h +++ b/gmp-impl.h @@ -3,7 +3,7 @@ THE CONTENTS OF THIS FILE ARE FOR INTERNAL USE AND ARE ALMOST CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES IN FUTURE GNU MP RELEASES. -Copyright 1991-2018 Free Software Foundation, Inc. +Copyright 1991-2018, 2021 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -3925,10 +3925,12 @@ __GMP_DECLSPEC extern const int __gmp_0; __GMP_DECLSPEC void __gmp_exception (int) ATTRIBUTE_NORETURN; __GMP_DECLSPEC void __gmp_divide_by_zero (void) ATTRIBUTE_NORETURN; __GMP_DECLSPEC void __gmp_sqrt_of_negative (void) ATTRIBUTE_NORETURN; +__GMP_DECLSPEC void __gmp_overflow_in_mpz (void) ATTRIBUTE_NORETURN; __GMP_DECLSPEC void __gmp_invalid_operation (void) ATTRIBUTE_NORETURN; #define GMP_ERROR(code) __gmp_exception (code) #define DIVIDE_BY_ZERO __gmp_divide_by_zero () #define SQRT_OF_NEGATIVE __gmp_sqrt_of_negative () +#define MPZ_OVERFLOW __gmp_overflow_in_mpz () #if defined _LONG_LONG_LIMB #define CNST_LIMB(C) ((mp_limb_t) C##LL) |