From 8a54f8f14612639467bdd67d19137e4e46d38b15 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 8 Dec 2019 15:01:54 +0100 Subject: [PATCH] math tests: Don't fail if isfinite, isinf, isnan, signbit is a macro. * tests/test-math-c++.cc (isfinite, isinf, isnan, signbit): Use #warning instead of #error. --- ChangeLog | 6 ++++++ tests/test-math-c++.cc | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d452db231a..5653d9e780 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2019-12-08 Bruno Haible + + math tests: Don't fail if isfinite, isinf, isnan, signbit is a macro. + * tests/test-math-c++.cc (isfinite, isinf, isnan, signbit): Use #warning + instead of #error. + 2019-12-08 Bruno Haible Fix compilation errors in C++ mode on FreeBSD. diff --git a/tests/test-math-c++.cc b/tests/test-math-c++.cc index 57bfd1be9c..190fd49feb 100644 --- a/tests/test-math-c++.cc +++ b/tests/test-math-c++.cc @@ -383,28 +383,28 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::truncl, long double, (long double)); #if GNULIB_TEST_ISFINITE # ifdef isfinite -# error "isfinite should not be a macro in C++" +# warning "isfinite should not be a macro in C++" # endif REAL_FLOATING_CHECK (isfinite, bool, (float), bool, (double), bool, (long double)); #endif #if GNULIB_TEST_ISINF # ifdef isinf -# error "isinf should not be a macro in C++" +# warning "isinf should not be a macro in C++" # endif REAL_FLOATING_CHECK (isinf, bool, (float), bool, (double), bool, (long double)); #endif #if GNULIB_TEST_ISNAN # ifdef isnan -# error "isnan should not be a macro in C++" +# warning "isnan should not be a macro in C++" # endif REAL_FLOATING_CHECK (isnan, bool, (float), bool, (double), bool, (long double)); #endif #if GNULIB_TEST_SIGNBIT # ifdef signbit -# error "signbit should not be a macro in C++" +# warning "signbit should not be a macro in C++" # endif REAL_FLOATING_CHECK (signbit, bool, (float), bool, (double), bool, (long double)); #endif -- 2.39.5