Re: [libstdc++] use strtold for from_chars even without locale

2023-05-11 Thread Jonathan Wakely via Gcc-patches
On Thu, 11 May 2023 at 17:04, Patrick Palka wrote: > On Fri, 5 May 2023, Jonathan Wakely wrote: > > > > > > > On Fri, 5 May 2023 at 10:43, Florian Weimer wrote: > > * Jonathan Wakely via Libstdc: > > > > > We could use strtod for a single-threaded target (i.e. > > >

Re: [libstdc++] use strtold for from_chars even without locale

2023-05-11 Thread Patrick Palka via Gcc-patches
On Fri, 5 May 2023, Jonathan Wakely wrote: > > > On Fri, 5 May 2023 at 10:43, Florian Weimer wrote: > * Jonathan Wakely via Libstdc: > > > We could use strtod for a single-threaded target (i.e. > > !defined(_GLIBCXX_HAS_GTHREADS) by changing the global locale using > >

Re: [libstdc++] use strtold for from_chars even without locale

2023-05-05 Thread Jonathan Wakely via Gcc-patches
On Fri, 5 May 2023 at 11:39, Alexandre Oliva wrote: > Here's a patch to skip/xfail the bits that are expected to fail on > aarch64-vxworks. > OK for trunk and gcc-13, thanks. > > > [libstdc++] [testsuite] xfail double-prec from_chars for ldbl > > When long double is wider than double, but

Re: [libstdc++] use strtold for from_chars even without locale

2023-05-05 Thread Alexandre Oliva via Gcc-patches
Here's a patch to skip/xfail the bits that are expected to fail on aarch64-vxworks. [libstdc++] [testsuite] xfail double-prec from_chars for ldbl When long double is wider than double, but from_chars is implemented in terms of double, tests that involve the full precision of long double are

Re: [libstdc++] use strtold for from_chars even without locale

2023-05-05 Thread Jonathan Wakely via Gcc-patches
On Fri, 5 May 2023 at 10:43, Florian Weimer wrote: > * Jonathan Wakely via Libstdc: > > > We could use strtod for a single-threaded target (i.e. > > !defined(_GLIBCXX_HAS_GTHREADS) by changing the global locale using > > setlocale, instead of changing the per-thread locale using uselocale. > >

Re: [libstdc++] use strtold for from_chars even without locale

2023-05-05 Thread Florian Weimer via Gcc-patches
* Jonathan Wakely via Libstdc: > We could use strtod for a single-threaded target (i.e. > !defined(_GLIBCXX_HAS_GTHREADS) by changing the global locale using > setlocale, instead of changing the per-thread locale using uselocale. This is not generally safe because the call to setlocale is still

Re: [libstdc++] use strtold for from_chars even without locale

2023-05-04 Thread Alexandre Oliva via Gcc-patches
On May 4, 2023, Jonathan Wakely wrote: > And we could use strtod for a target that doesn't support locales *at all* > (so strtod always behaves as specified for LANG=C). Oh, sorry, I misread the *_USELOCALE macro as *_USE_LOCALE, and I thought this was what I was doing. Nevermind, patch

Re: [libstdc++] use strtold for from_chars even without locale

2023-05-04 Thread Jonathan Wakely via Gcc-patches
On Thu, 4 May 2023 at 13:06, Alexandre Oliva via Libstdc++ < libstd...@gcc.gnu.org> wrote: > > When we're using fast_float for 32- and 64-bit floating point, use > strtold for wider long double, even if locales are unavailable. > > On vxworks, test for strtof's and strtold's declarations, so that