From dacd9a5c131a56fcc619fa1b70392e90035a1a06 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Mon, 8 Mar 2021 11:03:01 +0000 Subject: [tests] Ignore GCC's -Wc++-compat in the tests that are invalid in C++ (these tests are enabled only if __cplusplus is not defined). git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14461 280ebfd0-de03-0410-8827-d642c229c3f4 --- tests/tisnan.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/tisnan.c') diff --git a/tests/tisnan.c b/tests/tisnan.c index 9e234b8d1..550f7828f 100644 --- a/tests/tisnan.c +++ b/tests/tisnan.c @@ -48,6 +48,11 @@ main (void) (void) (mpfr_regular_p (1L)); #endif +#ifdef IGNORE_CPP_COMPAT +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wc++-compat" +#endif + /* check +infinity gives non-zero for mpfr_inf_p only */ mpfr_set_ui (x, 1L, MPFR_RNDZ); mpfr_div_ui (x, x, 0L, MPFR_RNDZ); @@ -248,6 +253,10 @@ main (void) } CHECK; +#ifdef IGNORE_CPP_COMPAT +#pragma GCC diagnostic pop +#endif + mpfr_clear (x); tests_end_mpfr (); -- cgit v1.2.1