public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1298] libstdc++: testsuite: use cmath long double overloads
@ 2022-06-27 13:35 Alexandre Oliva
0 siblings, 0 replies; only message in thread
From: Alexandre Oliva @ 2022-06-27 13:35 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:01e094f82d8d91e08f62465a2e4f7a4c4897f9cd
commit r13-1298-g01e094f82d8d91e08f62465a2e4f7a4c4897f9cd
Author: Alexandre Oliva <oliva@adacore.com>
Date: Mon Jun 27 10:34:19 2022 -0300
libstdc++: testsuite: use cmath long double overloads
In case we need to supplement the C standard library with additional
definitions for float and long double, the declarations expected to be
in the C headers may not be there. Rely on the cmath overloads
instead.
for libstdc++-v3/ChangeLog
* testsuite/20_util/to_chars/long_double.cc: Use cmath
long double overloads for nexttoward and ldexp.
Diff:
---
libstdc++-v3/testsuite/20_util/to_chars/long_double.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc b/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc
index 0b1c2c2936f..498388110b1 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc
@@ -54,11 +54,11 @@ namespace detail
{
long double
nextupl(long double x)
- { return nexttowardl(x, numeric_limits<long double>::infinity()); }
+ { return nexttoward(x, numeric_limits<long double>::infinity()); }
long double
nextdownl(long double x)
- { return nexttowardl(x, -numeric_limits<long double>::infinity()); }
+ { return nexttoward(x, -numeric_limits<long double>::infinity()); }
}
// The long double overloads of std::to_chars currently just go through printf
@@ -138,7 +138,7 @@ test01()
for (int exponent : {-11000, -3000, -300, -50, -7, 0, 7, 50, 300, 3000, 11000})
for (long double testcase : hex_testcases)
{
- testcase = ldexpl(testcase, exponent);
+ testcase = ldexp(testcase, exponent);
if (testcase == 0.0L || isinf(testcase))
continue;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-27 13:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27 13:35 [gcc r13-1298] libstdc++: testsuite: use cmath long double overloads Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).