Message ID | ZLgyqE97WQkOyZc+@mx3210.localdomain |
---|---|
State | New |
Headers | show |
Series | Use strtol instead of std::stoi in gensupport.cc | expand |
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. */
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
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. */