From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 306A33858C2B; Fri, 14 Jul 2023 09:58:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 306A33858C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689328689; bh=yYXbVE89FALRZA4QRYWE6JACL6LPwyhZvOi/XflJqLs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=suUhttNRA/LjydUwT/8fK678B45J7dCEmd6oChVNXatwH+Q1x5Ixuda/Zd0GAePRY uwJIWHEYhUMvflR68hHFCEgmJenZxaBrk3loP0Uwux+kx22ieY9cemY+m1WvlZ3Vep FL33yJyX+vo1SwfRFMIvE7K9bLyG2tfka0ssWyo8= 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: Fri, 14 Jul 2023 09:58: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: 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 #10 from Jonathan Wakely --- And this should fix it: --- a/libstdc++-v3/include/c_global/cstdlib +++ b/libstdc++-v3/include/c_global/cstdlib @@ -256,6 +256,20 @@ namespace std using ::__gnu_cxx::strtold; } // namespace std +#else // ! _GLIBCXX_USE_C99_STDLIB + +// We also check for strtof and strtold separately from _GLIBCXX_USE_C99_STDLIB + +#if _GLIBCXX_HAVE_STRTOF +#undef strtof +namespace std { using ::strtof; } +#endif + +#if _GLIBCXX_HAVE_STRTOLD +#undef strtold +namespace std { using ::strtold; } +#endif + #endif // _GLIBCXX_USE_C99_STDLIB } // extern "C++"=