]> git.ipfire.org Git - thirdparty/glibc.git/commit - math/basic-test.c
Remove NO_LONG_DOUBLE conditionals in libm tests (bug 21607).
authorJoseph Myers <joseph@codesourcery.com>
Wed, 28 Jun 2017 16:01:20 +0000 (16:01 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 28 Jun 2017 16:01:20 +0000 (16:01 +0000)
commit51737193a9810ceb1c516a2a71444fa70bcf8500
treea8afcc09879d8dcea321bf5e38bf270f5f937922
parent2dd0aec531ad03e8e1642f8642930451b23fe2ba
Remove NO_LONG_DOUBLE conditionals in libm tests (bug 21607).

As noted in bug 21607, NO_LONG_DOUBLE conditionals in libm tests are
no longer effective.  For most this is harmless - they were only
present because of long double functions not being declared with _LIBC
defined, and _LIBC is no longer defined for building most tests.  For
the few where this is actually relevant to the test, testing
LDBL_MANT_DIG > DBL_MANT_DIG is more appropriate as that limits the
test to public APIs.  This patch fixes the tests accordingly.

Tested for x86_64 and arm.

[BZ #21607]
* math/basic-test.c [!NO_LONG_DOUBLE]: Change conditionals to
[LDBL_MANT_DIG > DBL_MANT_DIG].
* math/bug-nextafter.c [!NO_LONG_DOUBLE]: Remove conditionals.
* math/bug-nexttoward.c [!NO_LONG_DOUBLE]: Likewise.
* math/test-math-isinff.cc [!NO_LONG_DOUBLE]: Likewise.
* math/test-math-iszero.cc [!NO_LONG_DOUBLE]: Likewise.
* math/test-nan-overflow.c [!NO_LONG_DOUBLE]: Likewise.
* math/test-nan-payload.c [!NO_LONG_DOUBLE]: Likewise.
* math/test-nearbyint-except-2.c [!NO_LONG_DOUBLE]: Likewise.
* math/test-nearbyint-except.c [!NO_LONG_DOUBLE]: Likewise.
* math/test-powl.c [!NO_LONG_DOUBLE]: Likewise.
* math/test-signgam-finite-c99.c [!NO_LONG_DOUBLE]: Likewise.
* math/test-signgam-finite.c [!NO_LONG_DOUBLE]: Likewise.
* math/test-signgam-main.c [!NO_LONG_DOUBLE]: Likewise.
* math/test-snan.c [!NO_LONG_DOUBLE]: Likewise.
* math/test-tgmath-ret.c [!NO_LONG_DOUBLE]: Likewise.
* math/test-tgmath.c: Include <float.h>.
[!NO_LONG_DOUBLE]: Change conditionals to [LDBL_MANT_DIG >
DBL_MANT_DIG].
* math/test-tgmath2.c: Include <float.h>.
[!NO_LONG_DOUBLE]: Change conditionals to [LDBL_MANT_DIG >
DBL_MANT_DIG].
18 files changed:
ChangeLog
math/basic-test.c
math/bug-nextafter.c
math/bug-nexttoward.c
math/test-math-isinff.cc
math/test-math-iszero.cc
math/test-nan-overflow.c
math/test-nan-payload.c
math/test-nearbyint-except-2.c
math/test-nearbyint-except.c
math/test-powl.c
math/test-signgam-finite-c99.c
math/test-signgam-finite.c
math/test-signgam-main.c
math/test-snan.c
math/test-tgmath-ret.c
math/test-tgmath.c
math/test-tgmath2.c