From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DEB663857C41; Wed, 19 Jul 2023 10:04:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DEB663857C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689761063; bh=Zt8DdubkjKza5k/WBc2ILD43EvOvRfAA3i8/DUfPi0A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=A2XWRuc+t4uqoFazj9E9CaFZi5Vw5JyUPoWQza5/UZN4MtWYVOwm+FOPFhTWDHCy+ YRKvV8lQlKKmo1cM1T/GJYiWUwKsvFxgIgN/HZEqHY2dj+hqd02w4PCfJ/oIi1Xfss CpQPhxP2gqRLjBgyR8uLjg4u8QCnZLzu/6yIWzjE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/110653] Support std::stoi etc. without C99 APIs Date: Wed, 19 Jul 2023 10:04:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110653 --- Comment #13 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:58303d42809f0e01f23262f592d37943f7703f71 commit r14-2635-g58303d42809f0e01f23262f592d37943f7703f71 Author: Jonathan Wakely Date: Thu Jul 13 10:44:57 2023 +0100 libstdc++: Check autoconf macros for strtof and strtold [PR110653] As well as the _GLIBCXX_USE_C99_STDLIB check, we also have a separate check in linkage.m4 for just strtof and strtold. We can use that to declare std::strtof and std::strtold in for additional targets. That allows us to enable std::stold on hpux11.11 which is missing strtoll, strtoull and strtof, so doesn't define _GLIBCXX_USE_C99_STDLIB. Although it doesn't help hpux11.11, we can define std::stof for more targets this way too. As with the previous commit for PR110653, this only affects the narrow character overloads. std::stof and std::stold for wstring still requires C99 support. libstdc++-v3/ChangeLog: PR libstdc++/110653 * include/bits/basic_string.h [_GLIBCXX_HAVE_STRTOF] (stof): Define. [_GLIBCXX_HAVE_STRTOLD] (stold): Define. * include/c_global/cstdlib [_GLIBCXX_HAVE_STRTOF] (strtof): Declare in namespace std. [_GLIBCXX_HAVE_STRTOLD] (strtold): Likewise.=