From 7a68c63e994cb5cd78f6bee7612a3878e497e9b8 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Thu, 4 Aug 2016 01:52:45 +0000 Subject: [tests] C++ compatibility: avoid errors with "g++ -std=c++11" or later. Note that as of GCC 6, "the default mode for C++ is now -std=gnu++14 instead of -std=gnu++98" . So, this fixes the failures in the build of the MPFR tests with g++ from GCC 6 without particular options. (merged changeset r10719 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10720 280ebfd0-de03-0410-8827-d642c229c3f4 --- tests/tpow_z.c | 2 +- tests/tset_si.c | 2 +- tests/tset_sj.c | 2 +- tests/tsi_op.c | 16 ++++++++-------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/tpow_z.c b/tests/tpow_z.c index 0acb9c0ca..6bed327a3 100644 --- a/tests/tpow_z.c +++ b/tests/tpow_z.c @@ -26,7 +26,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #include "mpfr-test.h" -#define ERROR(str) do { printf("Error for "str"\n"); exit (1); } while (0) +#define ERROR(str) do { printf ("Error for " str "\n"); exit (1); } while (0) static void check_special (void) diff --git a/tests/tset_si.c b/tests/tset_si.c index d77e9981e..ac74fd082 100644 --- a/tests/tset_si.c +++ b/tests/tset_si.c @@ -26,7 +26,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #include "mpfr-test.h" -#define ERROR(str) {printf("Error for "str"\n"); exit(1);} +#define ERROR(str) { printf ("Error for " str "\n"); exit (1); } static void test_2exp (void) diff --git a/tests/tset_sj.c b/tests/tset_sj.c index ac103b3b8..63f55d5f8 100644 --- a/tests/tset_sj.c +++ b/tests/tset_sj.c @@ -42,7 +42,7 @@ main (void) #else -#define ERROR(str) {printf("Error for "str"\n"); exit(1);} +#define ERROR(str) { printf ("Error for " str "\n"); exit (1); } static int inexact_sign (int x) diff --git a/tests/tsi_op.c b/tests/tsi_op.c index 5a84c6412..84eb744b9 100644 --- a/tests/tsi_op.c +++ b/tests/tsi_op.c @@ -26,14 +26,14 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #include "mpfr-test.h" -#define ERROR1(s, i, z, exp) \ -{\ - printf("Error for "s" and i=%d\n", i);\ - printf("Expected %s\n", exp);\ - printf("Got "); mpfr_out_str (stdout, 16, 0, z, MPFR_RNDN);\ - putchar ('\n');\ - exit(1);\ -} +#define ERROR1(s,i,z,exp) \ + { \ + printf ("Error for " s " and i=%d\n", i); \ + printf ("Expected %s\n", exp); \ + printf ("Got "); mpfr_out_str (stdout, 16, 0, z, MPFR_RNDN); \ + putchar ('\n'); \ + exit(1); \ + } const struct { const char * op1; -- cgit v1.2.1