Previous: Removed Functions, Up: API Compatibility [Index]
For users of a C++ compiler, the way how the availability of intmax_t
is detected has changed in MPFR 3.0.
In MPFR 2.x, if a macro INTMAX_C
or UINTMAX_C
was defined
(e.g. when the __STDC_CONSTANT_MACROS
macro had been defined
before <stdint.h>
or <inttypes.h>
has been included),
intmax_t
was assumed to be defined.
However this was not always the case (more precisely, intmax_t
can be defined only in the namespace std
, as with Boost), so
that compilations could fail.
Thus the check for INTMAX_C
or UINTMAX_C
is now disabled for
C++ compilers, with the following consequences:
intmax_t
may no longer
be compiled against MPFR 3.0: a #define MPFR_USE_INTMAX_T
may be
necessary before mpfr.h is included.
intmax_t
and uintmax_t
in the global
namespace, though this is not clean.
The divide-by-zero exception is new in MPFR 3.1. However it should not introduce incompatible changes for programs that strictly follow the MPFR API since the exception can only be seen via new functions.
As of MPFR 3.1, the mpfr.h header can be included several times, while still supporting optional functions (see Headers and Libraries).