diff options
-rw-r--r-- | README.dev | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/README.dev b/README.dev index 12114e002..7504a10c9 100644 --- a/README.dev +++ b/README.dev @@ -694,11 +694,13 @@ incorrect value in case of a bug in MPFR. =========================================================================== -Avoid mixing signed and unsigned types, in particular mp_exp_t, which is -signed, and mpfr_prec_t (mp_prec_t), which is unsigned, as this can lead -signed types to be converted into unsigned types. If such a signed type -contains a negative value, the result will probably be incorrect. In -general, you will need to cast a mpfr_prec_t into a mp_exp_t. +Avoid mixing signed and unsigned types, as this can lead signed types +to be automatically converted into unsigned types (usual arithmetic +conversions). If such a signed type contains a negative value, the +result will probably be incorrect. With MPFR 2.x, this problem could +arise with mp_exp_t, which is signed, and mpfr_prec_t (mp_prec_t), +which was unsigned (it is now signed), meaning that in general, a cast +of a mpfr_prec_t into a mp_exp_t was needed. Note that such bugs are difficult to detect because they may depend on the platform (e.g., on LP64, 32-bit unsigned int + 64-bit long is OK, |