public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Use strtol instead of std::stoi in gensupport.cc
@ 2023-07-19 18:59 John David Anglin
  2023-08-10 19:27 ` John David Anglin
  0 siblings, 1 reply; 3+ messages in thread
From: John David Anglin @ 2023-07-19 18:59 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

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  <danglin@gcc.gnu.org>

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.  */

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] Use strtol instead of std::stoi in gensupport.cc
  2023-07-19 18:59 [PATCH] Use strtol instead of std::stoi in gensupport.cc John David Anglin
@ 2023-08-10 19:27 ` John David Anglin
  2023-08-11 15:11   ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: John David Anglin @ 2023-08-10 19:27 UTC (permalink / raw)
  To: John David Anglin, GCC Patches

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  <danglin@gcc.gnu.org>
>
> 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.anglin@bell.net


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

* Re: [PATCH] Use strtol instead of std::stoi in gensupport.cc
  2023-08-10 19:27 ` John David Anglin
@ 2023-08-11 15:11   ` Jeff Law
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Law @ 2023-08-11 15:11 UTC (permalink / raw)
  To: John David Anglin, John David Anglin, 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  <danglin@gcc.gnu.org>
>>
>> gcc/ChangeLog:
>>
>>     PR bootstrap/110646
>>     * gensupport.cc(class conlist): Use strtol instead of std::stoi.
OK.  Sorry this got missed.

jeff

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-19 18:59 [PATCH] Use strtol instead of std::stoi in gensupport.cc John David Anglin
2023-08-10 19:27 ` John David Anglin
2023-08-11 15:11   ` Jeff Law

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