From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8F4F23858C1F; Thu, 13 Jul 2023 09:43:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F4F23858C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689241435; bh=3VPdIWkibEeElFxoZyMFaz5Pt+nWN+lBaIOAJsEtsXY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FeZhFHQjxlIQbFaem9XJsWeLX2cg03yFQmmc9IcMVANVCK+ztlGrl1QIV4pEjulai 2Q1KON94p1zDd71NIXqKbOTCqiymerGGq1FX7K3iUm2pbxtOZVYGdcSsPvY9XGFu3x 7amprwlFmYOMoZ7RNDIuQee1fXNjJ1L0Sm4N5Fu0= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/110653] Support std::stoi etc. without C99 APIs Date: Thu, 13 Jul 2023 09:43:55 +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: redi 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: bug_status cf_reconfirmed_on everconfirmed assigned_to 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 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2023-07-13 Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu= .org --- Comment #1 from Jonathan Wakely --- std::stoi, std::stol and stoul only depend on strtol and strtoul which are = in C89, so don't need to be guarded by _GLIBCXX_USE_C99_STDLIB std::stoll and std::stoull can be implemented without C99 strtoll and strto= ull if sizeof(long) =3D=3D sizeof(long long). std::stod only depends on strtod which is in C89. std::stold can be implemented without C99 strtold if DBL_MANT_DIG =3D=3D LDBL_MANT_DIG.=