diff options
author | Bruno Haible <bruno@clisp.org> | 2022-04-13 23:43:05 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2022-04-13 23:43:05 +0200 |
commit | 3308ca32864e34c28c8813f7abf7e00d517d4e1d (patch) | |
tree | fb426a6202b680e7b25a145bfe7933fe7b686dbc /tests/test-math-c++.cc | |
parent | 6b1d2d6ccc2c9f3c9532489ef74a6c5f8470e17a (diff) | |
download | gnulib-3308ca32864e34c28c8813f7abf7e00d517d4e1d.tar.gz |
math: Fix errors in C++ mode on glibc systems with clang.
* lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISFINITE,
GNULIB_NAMESPACE_LACKS_ISINF, GNULIB_NAMESPACE_LACKS_ISNAN,
GNULIB_NAMESPACE_LACKS_SIGNBIT): New macros.
* tests/test-math-c++.cc (isfinite): Skip test if
GNULIB_NAMESPACE_LACKS_ISFINITE is 1.
(isinf): Skip test if GNULIB_NAMESPACE_LACKS_ISINF is 1.
(isnan): Skip test if GNULIB_NAMESPACE_LACKS_ISNAN is 1.
(signbit): Skip test if GNULIB_NAMESPACE_LACKS_SIGNBIT is 1.
Diffstat (limited to 'tests/test-math-c++.cc')
-rw-r--r-- | tests/test-math-c++.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test-math-c++.cc b/tests/test-math-c++.cc index e9a7bfa6a5..6749fa58a1 100644 --- a/tests/test-math-c++.cc +++ b/tests/test-math-c++.cc @@ -385,28 +385,36 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::truncl, long double, (long double)); # ifdef isfinite # warning "isfinite should not be a macro in C++" # endif +# if !GNULIB_NAMESPACE_LACKS_ISFINITE REAL_FLOATING_CHECK (isfinite, bool, (float), bool, (double), bool, (long double)); +# endif #endif #if GNULIB_TEST_ISINF # ifdef isinf # warning "isinf should not be a macro in C++" # endif +# if !GNULIB_NAMESPACE_LACKS_ISINF REAL_FLOATING_CHECK (isinf, bool, (float), bool, (double), bool, (long double)); +# endif #endif #if GNULIB_TEST_ISNAN # ifdef isnan # warning "isnan should not be a macro in C++" # endif +# if !GNULIB_NAMESPACE_LACKS_ISNAN REAL_FLOATING_CHECK (isnan, bool, (float), bool, (double), bool, (long double)); +# endif #endif #if GNULIB_TEST_SIGNBIT # ifdef signbit # warning "signbit should not be a macro in C++" # endif +# if !GNULIB_NAMESPACE_LACKS_SIGNBIT REAL_FLOATING_CHECK (signbit, bool, (float), bool, (double), bool, (long double)); +# endif #endif |