summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mpfr-impl.h6
-rw-r--r--tests/tstrtofr.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/mpfr-impl.h b/src/mpfr-impl.h
index d5839657e..46a3e9d6e 100644
--- a/src/mpfr-impl.h
+++ b/src/mpfr-impl.h
@@ -934,6 +934,12 @@ union ieee_decimal128
nonnegative. */
#define MPFR_UEXP(X) (MPFR_ASSERTD ((X) >= 0), (mpfr_uexp_t) (X))
+/* Define mpfr_eexp_t, mpfr_ueexp_t and MPFR_EXP_FSPEC.
+ Warning! MPFR_EXP_FSPEC is the length modifier associated with
+ these types mpfr_eexp_t / mpfr_ueexp_t, not with mpfr_exp_t.
+ (Should we change that, or is this safer to detect bugs, e.g.
+ in the context of an expression with computations with long?)
+*/
#if _MPFR_EXP_FORMAT <= 3
typedef long mpfr_eexp_t;
typedef unsigned long mpfr_ueexp_t;
diff --git a/tests/tstrtofr.c b/tests/tstrtofr.c
index 49d731024..943f49f19 100644
--- a/tests/tstrtofr.c
+++ b/tests/tstrtofr.c
@@ -1413,7 +1413,7 @@ random_tests (void)
j++;
}
- sprintf (s2 + (j+2), "@%" MPFR_EXP_FSPEC "d", e0);
+ sprintf (s2 + (j+2), "@%" MPFR_EXP_FSPEC "d", (mpfr_eexp_t) e0);
while (noteq == 0 && j < BSIZE - 1)
{