]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use strtol instead of std::stoi [PR110646]
authorJohn David Anglin <danglin@gcc.gnu.org>
Fri, 11 Aug 2023 15:44:37 +0000 (15:44 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 11 Aug 2023 15:44:37 +0000 (15:44 +0000)
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.

gcc/gensupport.cc

index b2feb03363aca93cf1d7101cc31ed6947905d154..f7164b3214d210c99cc11f7bc71096cd8a6987e1 100644 (file)
@@ -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.  */