diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-08-04 01:52:45 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-08-04 01:52:45 +0000 |
commit | 7a68c63e994cb5cd78f6bee7612a3878e497e9b8 (patch) | |
tree | b7eacdeaafb8e9f294696a4222de3db7c6130b1b | |
parent | 2470a4cca02091e150ae6f283be44d080425afc6 (diff) | |
download | mpfr-7a68c63e994cb5cd78f6bee7612a3878e497e9b8.tar.gz |
[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" <https://gcc.gnu.org/gcc-6/changes.html>.
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
-rw-r--r-- | tests/tpow_z.c | 2 | ||||
-rw-r--r-- | tests/tset_si.c | 2 | ||||
-rw-r--r-- | tests/tset_sj.c | 2 | ||||
-rw-r--r-- | 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; |