public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-110653-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110653

            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=c++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 -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H 
-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 = 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.

             reply	other threads:[~2023-07-13  9:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13  9:40 redi at gcc dot gnu.org [this message]
2023-07-13  9:43 ` [Bug libstdc++/110653] " redi at gcc dot gnu.org
2023-07-13 13:46 ` redi at gcc dot gnu.org
2023-07-13 15:14 ` dave.anglin at bell dot net
2023-07-13 16:59 ` cvs-commit at gcc dot gnu.org
2023-07-13 17:09 ` redi at gcc dot gnu.org
2023-07-13 17:57 ` dave.anglin at bell dot net
2023-07-13 18:16 ` dave.anglin at bell dot net
2023-07-14  1:20 ` dave.anglin at bell dot net
2023-07-14  7:39 ` redi at gcc dot gnu.org
2023-07-14  9:58 ` redi at gcc dot gnu.org
2023-07-15 14:52 ` dave.anglin at bell dot net
2023-07-15 19:39 ` redi at gcc dot gnu.org
2023-07-19 10:04 ` cvs-commit at gcc dot gnu.org
2023-07-19 10:04 ` cvs-commit at gcc dot gnu.org
2023-07-19 10:04 ` cvs-commit at gcc dot gnu.org
2023-07-19 10:10 ` redi at gcc dot gnu.org
2023-07-19 10:10 ` redi at gcc dot gnu.org
2023-07-19 13:48 ` dave.anglin at bell dot net
2023-07-19 13:51 ` redi at gcc dot gnu.org
2023-07-21 18:25 ` dave.anglin at bell dot net
2023-07-21 18:27 ` redi at gcc dot gnu.org
2023-07-24 20:04 ` cvs-commit at gcc dot gnu.org
2023-08-10 19:25 ` danglin at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-110653-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).