Re: [PATCH] Use strtol instead of std::stoi in gensupport.cc

2023-08-11 Thread Jeff Law via Gcc-patches




On 8/10/23 13:27, John David Anglin wrote:

Ping.

On 2023-07-19 2:59 p.m., John David Anglin wrote:

Tested on trunk with hppa64-hp-hpux11.11.

Okay?

Dave
---

Use strtol instead of std::stoi [PR110646]

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

2023-07-19  John David Anglin  

gcc/ChangeLog:

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

OK.  Sorry this got missed.

jeff


Re: [PATCH] Use strtol instead of std::stoi in gensupport.cc

2023-08-10 Thread John David Anglin

Ping.

On 2023-07-19 2:59 p.m., John David Anglin wrote:

Tested on trunk with hppa64-hp-hpux11.11.

Okay?

Dave
---

Use strtol instead of std::stoi [PR110646]

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

2023-07-19  John David Anglin  

gcc/ChangeLog:

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

diff --git a/gcc/gensupport.cc b/gcc/gensupport.cc
index 959d1d9c83c..87bcf5ee441 100644
--- a/gcc/gensupport.cc
+++ b/gcc/gensupport.cc
@@ -640,7 +640,7 @@ public:
  
  name.assign (ns, len);

  if (numeric)
-  idx = std::stoi (name);
+  idx = strtol (name.c_str (), (char **)NULL, 10);
}
  
/* Adds a character to the end of the string.  */



--
John David Anglin  dave.ang...@bell.net