From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C1CF73858C74; Thu, 13 Jul 2023 13:46:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C1CF73858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689255968; bh=yeRAlxUqMlR1DQO0K6HBPbSSK9tLhGNgwWR2EwnF+Mc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ys1HBVspOj5ky5o8WbteXbAglmmYkfsQQ5UvOzqoMXNOS6zn/BDGlYQfOWPmS0Nuv QX90m94RfjfrMVFkgJRtMQc550lI+0UHfJEWfoaJFuimAOsa/62rOSmjuI+5ok+Li/ emhVkYXJT6H3UqJ4wINXor5QpMImocVpJmKctAtc= 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 13:46:07 +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: attachments.created 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 #2 from Jonathan Wakely --- Created attachment 55534 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55534&action=3Dedit libstdc++: std::stoi etc. do not need C99 support Dave, does this patch work for hppa64-hp-hpux11.11 ? It should allow you to compile + run the code below: #include int main() { std::string z =3D "0"; return std::stoi(z) + std::stol(z) + std::stoul(z) + std::stoll(z) + std::stoull(z) + std::stod(z); } I'm not sure if double and long double are the same representation on this target, but if they are then std::stold("0.0") should work too.=