diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-09-22 07:53:16 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-09-22 07:53:16 +0000 |
commit | f60445117cff1df3e2ec7499ce2279a350bbb467 (patch) | |
tree | b577b69538b6f0a8de067106e5b71be28b675f9d /tests/texceptions.c | |
parent | 7747127b5a783263b7c86c7ea1df762380cc2992 (diff) | |
download | mpfr-f60445117cff1df3e2ec7499ce2279a350bbb467.tar.gz |
(test_set_underflow, test_set_overflow): Cleaner fix (for pre-C99
compilers).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2428 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/texceptions.c')
-rw-r--r-- | tests/texceptions.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/texceptions.c b/tests/texceptions.c index 8654112fd..9af908d42 100644 --- a/tests/texceptions.c +++ b/tests/texceptions.c @@ -52,8 +52,8 @@ static void test_set_underflow (void) { /* static to allow non-constant initialiers in r */ - static mpfr_t x, zero, min; - static mpfr_ptr r[4] = { min, zero, min, zero }; + mpfr_t x, zero, min; + mpfr_ptr r[4]; int t[4] = { 1, -1, 1, -1 }; mp_rnd_t i; int s; @@ -62,6 +62,8 @@ test_set_underflow (void) mpfr_set_ui (zero, 0, GMP_RNDN); mpfr_set_ui (min, 0, GMP_RNDN); mpfr_nextabove (min); + r[0] = r[2] = min; + r[1] = r[3] = zero; for (s = 1; s > 0; s = -1) { for (i = 0; i < 4; i++) @@ -93,8 +95,8 @@ static void test_set_overflow (void) { /* static to allow non-constant initialiers in r */ - static mpfr_t x, inf, max; - static mpfr_ptr r[4] = { inf, max, inf, max }; + mpfr_t x, inf, max; + mpfr_ptr r[4]; int t[4] = { 1, -1, 1, -1 }; mp_rnd_t i; int s; @@ -103,6 +105,8 @@ test_set_overflow (void) mpfr_set_inf (inf, 1); mpfr_set_inf (max, 1); mpfr_nextbelow (max); + r[0] = r[2] = inf; + r[1] = r[3] = max; for (s = 1; s > 0; s = -1) { for (i = 0; i < 4; i++) |