[PATCH 2/6] libstdc++: Import the fast_float library

Hans-Peter Nilsson hp@axis.com
Tue Jan 18 03:10:05 GMT 2022


> From: Patrick Palka via Gcc-patches <gcc-patches@gcc.gnu.org>
> Date: Sun, 16 Jan 2022 19:06:48 +0100

> We're going to use the fast_float library in our (compiled-in)
> floating-point std::from_chars implementation for faster and more
> portable parsing of binary32/64 decimal strings.
> 
> The single file fast_float.h is an amalgamation of the entire library,
> which can be (re)generated with the command
> 
>   python3 ./script/amalgamate.py --license=MIT \
>     > $GCC_SRC/libstdc++-v3/c++17/fast_float/fast_float.h
> 
> [1]: https://github.com/fastfloat/fast_float
> 
> libstdc++-v3/ChangeLog:
> 
>         * src/c++17/fast_float/LOCAL_PATCHES: New file.
>         * src/c++17/fast_float/MERGE: New file.
>         * src/c++17/fast_float/README.fd: New file, copied from the
>         fast_float library sources.
>         * src/c++17/fast_float/fast_float.h: New file, an amalgamation
>         of the fast_float library.

This broke builds for newlib targets, as they don't have
<endian.h> but <machine/endian.h>.  See PR104080 for
details.  After the obvious fix, there seems to be some
additional type mismatch also quoted in the bugzilla.

Not thrilled by large stage3 changes.  The fallout risk
should have been obvious.  :(

(And after this, there's a regress-84 to sort out.  Bah.)

brgds, H-P


More information about the Gcc-patches mailing list