From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D89EF3858C1F; Thu, 13 Jul 2023 09:40:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D89EF3858C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689241252; bh=p2Fy9h30htVKen68wPDQNkLVXEkmcEzw9Eu9n6RdvpU=; h=From:To:Subject:Date:From; b=rwYTPDNrAoZ1eQY6S0SNMIqTE1b224mZsFuWlwTS50zXxDzkMmZ5v/3tsHO0Hh9ji jwnjGfpyGQQo4ULCE1YTyVULnE73JeZxYXejAEQZo9JGfro8Y2BDoo85BXPFXJ22dk rB1bDuagCdsKQ8sgRW8r3m+wn18iWt2puN5AmuUw= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/110653] New: Support std::stoi etc. without C99 APIs Date: Thu, 13 Jul 2023 09:40:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone cf_gcchost cf_gcctarget cf_gccbuild Message-ID: 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 Bug ID: 110653 Summary: Support std::stoi etc. without C99 APIs Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org CC: danglin at gcc dot gnu.org, redi at gcc dot gnu.org, unassigned at gcc dot gnu.org Target Milestone: --- Host: hppa64-hp-hpux11.11 Target: hppa64-hp-hpux11.11 Build: hppa64-hp-hpux11.11 +++ This bug was initially created as a clone of Bug #110646 +++ g++ -std=3Dc++11 -c -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwi nd-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmiss ing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedant= ic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG= _H=20 -DGENERATOR_FILE -I. -Ibuild -I../../gcc/gcc -I../../gcc/gcc/build -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include \ -o build/gensupport.o ../../gcc/gcc/gensupport.cc ../../gcc/gcc/gensupport.cc: In constructor 'conlist::conlist(const char*, unsigned int, bool)': ../../gcc/gcc/gensupport.cc:643:18: error: 'stoi' is not a member of 'std';= did you mean 'atoi'? 643 | idx =3D std::stoi (name); | ^~~~ | atoi Build gcc is: gcc version 12.2.1 20230420 [remotes/origin/releases/gcc-12 r12-9449-g3907147aa9 b] (GCC) libstdc++ provides std::stoi in basic_string.h when _GLIBCXX_USE_C99_STDLIB= is 1. However, hpux11.11 lacks all the routines needed when _GLIBCXX_USE_C99_STDLIB is 1. But it does have strtol, atol, atoi, strtoul, strtod and atof. strtoll and strtoull are not needed on hppa64 as long long and long are equivalent. So it seems the string conversion routines could = be provided in basic_string.h for this target.=