public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/110646] New: gensupport.cc:643:18: error: 'stoi' is not a member of 'std'
@ 2023-07-12 19:19 danglin at gcc dot gnu.org
  2023-07-12 19:24 ` [Bug bootstrap/110646] [14 Regression] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: danglin at gcc dot gnu.org @ 2023-07-12 19:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110646
           Summary: gensupport.cc:643:18: error: 'stoi' is not a member of
                    'std'
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danglin at gcc dot gnu.org
                CC: redi at gcc dot gnu.org
  Target Milestone: ---
              Host: hppa64-hp-hpux11.11
            Target: hppa64-hp-hpux11.11
             Build: hppa64-hp-hpux11.11

Created attachment 55532
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55532&action=edit
Fix for build error.

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug bootstrap/110646] [14 Regression] gensupport.cc:643:18: error: 'stoi' is not a member of 'std'
  2023-07-12 19:19 [Bug libstdc++/110646] New: gensupport.cc:643:18: error: 'stoi' is not a member of 'std' danglin at gcc dot gnu.org
@ 2023-07-12 19:24 ` pinskia at gcc dot gnu.org
  2023-07-12 20:05 ` dave.anglin at bell dot net
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-12 19:24 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|gensupport.cc:643:18:       |[14 Regression]
                   |error: 'stoi' is not a      |gensupport.cc:643:18:
                   |member of 'std'             |error: 'stoi' is not a
                   |                            |member of 'std'
   Target Milestone|---                         |14.0
          Component|libstdc++                   |bootstrap

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug bootstrap/110646] [14 Regression] gensupport.cc:643:18: error: 'stoi' is not a member of 'std'
  2023-07-12 19:19 [Bug libstdc++/110646] New: gensupport.cc:643:18: error: 'stoi' is not a member of 'std' danglin at gcc dot gnu.org
  2023-07-12 19:24 ` [Bug bootstrap/110646] [14 Regression] " pinskia at gcc dot gnu.org
@ 2023-07-12 20:05 ` dave.anglin at bell dot net
  2023-07-12 20:26 ` redi at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dave.anglin at bell dot net @ 2023-07-12 20:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from dave.anglin at bell dot net ---
Note this occurs in stage1.  Bug was introduced in commit
957ae90406591739b68e95ad49a0232faeb74217.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug bootstrap/110646] [14 Regression] gensupport.cc:643:18: error: 'stoi' is not a member of 'std'
  2023-07-12 19:19 [Bug libstdc++/110646] New: gensupport.cc:643:18: error: 'stoi' is not a member of 'std' danglin at gcc dot gnu.org
  2023-07-12 19:24 ` [Bug bootstrap/110646] [14 Regression] " pinskia at gcc dot gnu.org
  2023-07-12 20:05 ` dave.anglin at bell dot net
@ 2023-07-12 20:26 ` redi at gcc dot gnu.org
  2023-07-12 20:31 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-12 20:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to John David Anglin from comment #0)
> 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.

Yes, those checks could be more granular.

I'll split out the checks needed for std::stoi etc.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug bootstrap/110646] [14 Regression] gensupport.cc:643:18: error: 'stoi' is not a member of 'std'
  2023-07-12 19:19 [Bug libstdc++/110646] New: gensupport.cc:643:18: error: 'stoi' is not a member of 'std' danglin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-07-12 20:26 ` redi at gcc dot gnu.org
@ 2023-07-12 20:31 ` redi at gcc dot gnu.org
  2023-07-13  8:27 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-12 20:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We'll still need to avoid std::stoi in stage1 because the host compiler might
not have it, even if we make it available in libstdc++ for stage2 and stage3.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug bootstrap/110646] [14 Regression] gensupport.cc:643:18: error: 'stoi' is not a member of 'std'
  2023-07-12 19:19 [Bug libstdc++/110646] New: gensupport.cc:643:18: error: 'stoi' is not a member of 'std' danglin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-07-12 20:31 ` redi at gcc dot gnu.org
@ 2023-07-13  8:27 ` rguenth at gcc dot gnu.org
  2023-07-13 10:00 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-13  8:27 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
           Priority|P3                          |P1
           Keywords|                            |build
   Last reconfirmed|                            |2023-07-13

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug bootstrap/110646] [14 Regression] gensupport.cc:643:18: error: 'stoi' is not a member of 'std'
  2023-07-12 19:19 [Bug libstdc++/110646] New: gensupport.cc:643:18: error: 'stoi' is not a member of 'std' danglin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-07-13  8:27 ` rguenth at gcc dot gnu.org
@ 2023-07-13 10:00 ` redi at gcc dot gnu.org
  2023-08-11 15:45 ` cvs-commit at gcc dot gnu.org
  2023-08-11 15:54 ` danglin at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-13 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #2)
> I'll split out the checks needed for std::stoi etc.

See Bug 110653 for the library improvements.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug bootstrap/110646] [14 Regression] gensupport.cc:643:18: error: 'stoi' is not a member of 'std'
  2023-07-12 19:19 [Bug libstdc++/110646] New: gensupport.cc:643:18: error: 'stoi' is not a member of 'std' danglin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-07-13 10:00 ` redi at gcc dot gnu.org
@ 2023-08-11 15:45 ` cvs-commit at gcc dot gnu.org
  2023-08-11 15:54 ` danglin at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-11 15:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by John David Anglin <danglin@gcc.gnu.org>:

https://gcc.gnu.org/g:834d1422c2e056f483542f1aff2cfc211bfcc748

commit r14-3155-g834d1422c2e056f483542f1aff2cfc211bfcc748
Author: John David Anglin <danglin@gcc.gnu.org>
Date:   Fri Aug 11 15:44:37 2023 +0000

    Use strtol instead of std::stoi [PR110646]

    Implementation of std::stoi was overlooked on hppa-hpux, so use
    strtol instead.

    2023-08-11  John David Anglin  <danglin@gcc.gnu.org>

    gcc/ChangeLog:

            PR bootstrap/110646
            * gensupport.cc(class conlist): Use strtol instead of std::stoi.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug bootstrap/110646] [14 Regression] gensupport.cc:643:18: error: 'stoi' is not a member of 'std'
  2023-07-12 19:19 [Bug libstdc++/110646] New: gensupport.cc:643:18: error: 'stoi' is not a member of 'std' danglin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-08-11 15:45 ` cvs-commit at gcc dot gnu.org
@ 2023-08-11 15:54 ` danglin at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: danglin at gcc dot gnu.org @ 2023-08-11 15:54 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from John David Anglin <danglin at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-08-11 15:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-12 19:19 [Bug libstdc++/110646] New: gensupport.cc:643:18: error: 'stoi' is not a member of 'std' danglin at gcc dot gnu.org
2023-07-12 19:24 ` [Bug bootstrap/110646] [14 Regression] " pinskia at gcc dot gnu.org
2023-07-12 20:05 ` dave.anglin at bell dot net
2023-07-12 20:26 ` redi at gcc dot gnu.org
2023-07-12 20:31 ` redi at gcc dot gnu.org
2023-07-13  8:27 ` rguenth at gcc dot gnu.org
2023-07-13 10:00 ` redi at gcc dot gnu.org
2023-08-11 15:45 ` cvs-commit at gcc dot gnu.org
2023-08-11 15:54 ` danglin at gcc dot gnu.org

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).