From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id D9A0E38485AA; Fri, 6 May 2022 10:27:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9A0E38485AA MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-8347] [PR105324] libstdc++: testsuite: pr105324 requires FP from_char X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: 8b26d0e28bb1875392f0689266a5f5f0a7737418 X-Git-Newrev: e8cd7d0066e0ba2a082b0e7de35e883837546583 Message-Id: <20220506102720.D9A0E38485AA@sourceware.org> Date: Fri, 6 May 2022 10:27:20 +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: Fri, 06 May 2022 10:27:21 -0000 https://gcc.gnu.org/g:e8cd7d0066e0ba2a082b0e7de35e883837546583 commit r12-8347-ge8cd7d0066e0ba2a082b0e7de35e883837546583 Author: Alexandre Oliva Date: Fri May 6 07:26:04 2022 -0300 [PR105324] libstdc++: testsuite: pr105324 requires FP from_char The floating-point overloads of from_char are only declared if _GLIBCXX_HAVE_USELOCALE is #defined as nonzero. That's exposed from charconv as __cpp_lib_to_chars >= 201611L, so guard the test body with that. for libstdc++-v3/ChangeLog PR c++/105324 * testsuite/20_util/from_chars/pr105324.cc: Guard test body with conditional for floating-point overloads of from_char. (cherry picked from commit 25389f3de489c25a6983db96428a6bf06aedc829) Diff: --- libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc b/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc index cecb17e41cc..ef24b4c5c7b 100644 --- a/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc +++ b/libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc @@ -5,10 +5,12 @@ int main() { +#if __cpp_lib_to_chars >= 201611L // FP from_char not available otherwise. // PR libstdc++/105324 // std::from_chars() assertion at floating_from_chars.cc:78 std::string s(512, '1'); s[1] = '.'; long double d; std::from_chars(s.data(), s.data() + s.size(), d); +#endif }