diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2019-01-25 02:00:06 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2019-01-25 02:00:06 +0000 |
commit | f79ac796ca6326648311669eebe001379c315b17 (patch) | |
tree | 4859e16d034ec773ead6a20e30c9b23044cb2b20 /tests/trint.c | |
parent | a8157ad1c4de350a86b68f7b02662b2d9ba597d8 (diff) | |
download | mpfr-f79ac796ca6326648311669eebe001379c315b17.tar.gz |
[configure.ac] By default (i.e. if CFLAGS is not already set), if
the compiler is GCC not in C++ mode, add the -Wc++-compat warning
since we expect the code to compile with a C++ compiler.
[acinclude.m4,tests/trint.c] Fixed C++ compatibility issues detected
thanks to this option used with -Werror.
(merged changesets r13406-13408 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13409 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/trint.c')
-rw-r--r-- | tests/trint.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/trint.c b/tests/trint.c index fbf599b1c..fd2a45ca2 100644 --- a/tests/trint.c +++ b/tests/trint.c @@ -337,12 +337,12 @@ test_fct (double (*f)(double), int (*g)(), char *s, mpfr_rnd_t r) mpfr_clear (yy); } -#define TEST_FCT(F) test_fct (&F, &mpfr_##F, #F, r) +#define TEST_FCT(F) test_fct (&F, &mpfr_##F, #F, (mpfr_rnd_t) r) static void test_against_libc (void) { - mpfr_rnd_t r = MPFR_RNDN; + int r = MPFR_RNDN; (void) r; /* avoid a warning by using r */ #if HAVE_ROUND @@ -359,8 +359,8 @@ test_against_libc (void) #endif #if HAVE_NEARBYINT for (r = 0; r < MPFR_RND_MAX ; r++) - if (mpfr_set_machine_rnd_mode (r) == 0) - test_fct (&nearbyint, &mpfr_rint, "rint", r); + if (mpfr_set_machine_rnd_mode ((mpfr_rnd_t) r) == 0) + test_fct (&nearbyint, &mpfr_rint, "rint", (mpfr_rnd_t) r); #endif } |