diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-05-07 12:33:57 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-05-07 12:33:57 +0000 |
commit | cad2453859447f5aa3c2c7d98b77ab0f01b35039 (patch) | |
tree | f7d6c119cd330e7bd105bbcdc28471cbd5973db7 /tests/tcheck.c | |
parent | 4492d64d4c85391b2f344ac4c4c59d070c3c1d95 (diff) | |
download | mpfr-cad2453859447f5aa3c2c7d98b77ab0f01b35039.tar.gz |
[tests/tcheck.c] Support signed mpfr_prec_t (avoid integer overflow).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6785 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tcheck.c')
-rw-r--r-- | tests/tcheck.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/tcheck.c b/tests/tcheck.c index adae1ff8f..8a6c59334 100644 --- a/tests/tcheck.c +++ b/tests/tcheck.c @@ -69,8 +69,12 @@ main (void) /* Check prec */ MPFR_PREC(a) = 1; if (mpfr_check(a)) ERROR("precmin"); - MPFR_PREC(a) = MPFR_PREC_MAX+1; - if (mpfr_check(a)) ERROR("precmax"); + if ((mpfr_prec_t) 0 - 1 > 0) + { + printf ("blah\n"); + MPFR_PREC(a) = MPFR_PREC_MAX+1; + if (mpfr_check(a)) ERROR("precmax"); + } MPFR_PREC(a) = pr; if (!mpfr_check(a)) ERROR("prec"); /* Check exponent */ |