From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8F1B93857835; Mon, 24 Jul 2023 20:04:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F1B93857835 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690229063; bh=qdXI1c7D+Kxk1MvPxePE4bWZJNWVbvG7jEN4exUW/sM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QSUKK00YTaiUWjtvIEEySq9Dp97lgvIrw8FINuG3E8xBu2pOlvPaajYR5zNkiUcXs q2U+X5iE34efz/yFAb+Lh2wHGAfzokzUnXWmumemWUdJAkYeD6A+g8VfZFe0nzVxrF zmT/dUt9Coh534DMSO/AVoA4s6RQIFYMtKwppyjI= 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: Mon, 24 Jul 2023 20:04:22 +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 #22 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:31c3b67dfc6e67773d13260bc38b833663698b74 commit r14-2753-g31c3b67dfc6e67773d13260bc38b833663698b74 Author: Jonathan Wakely Date: Mon Jul 24 11:45:43 2023 +0100 libstdc++; Do not use strtold for hppa-hpux [PR110653] When I switched std::stold to depend on HAVE_STRTOLD that enabled it for hppa-hpux which defines HAVE_BROKEN_STRTOLD. Add a check for that macro so that we don't use strtold, and fall through to the check for double and long double having the same representation. That should mean we define a conforming std::stold in terms of std::stod, instead of trying to use the broken strtold. Also fix a logic error in the fallback definition of std::stod, which should not treat zero as a subnormal number. libstdc++-v3/ChangeLog: PR libstdc++/110653 * include/bits/basic_string.h [!HAVE_STOF] (stof): Do not throw an exception for zero result. [HAVE_BROKEN_STRTOLD] (stold): Do not use strtold.=