From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id BD08C3850873; Tue, 21 Jun 2022 00:07:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD08C3850873 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: use cmath long double overloads X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/users/aoliva/heads/testme X-Git-Oldrev: d95a7f8cba71bf3604a08bcb009b26748b9365d6 X-Git-Newrev: 7d06c41f78a3b7f06d190beb115986a1c32b5f4c Message-Id: <20220621000750.BD08C3850873@sourceware.org> Date: Tue, 21 Jun 2022 00:07:50 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2022 00:07:50 -0000 https://gcc.gnu.org/g:7d06c41f78a3b7f06d190beb115986a1c32b5f4c commit 7d06c41f78a3b7f06d190beb115986a1c32b5f4c Author: Alexandre Oliva Date: Mon Jun 20 19:43:42 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. TN: V527-029 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::infinity()); } + { return nexttoward(x, numeric_limits::infinity()); } long double nextdownl(long double x) - { return nexttowardl(x, -numeric_limits::infinity()); } + { return nexttoward(x, -numeric_limits::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;