libstdc++: Do not use fast_float for 16-bit size_t [PR104870]

The preprocessor condition for using fast_float should match the one in
the header, and require at least 32-bit size_t.

libstdc++-v3/ChangeLog:

	PR libstdc++/104870
	* src/c++17/floating_from_chars.cc: Check __SIZE_WIDTH__ >= 32
	before using fast_float.
This commit is contained in:
Jonathan Wakely 2022-03-10 21:13:20 +00:00
parent d016dd7dbb
commit a8db9b9043

View File

@ -61,7 +61,8 @@
extern "C" __ieee128 __strtoieee128(const char*, char**);
#endif
#if _GLIBCXX_FLOAT_IS_IEEE_BINARY32 && _GLIBCXX_DOUBLE_IS_IEEE_BINARY64
#if _GLIBCXX_FLOAT_IS_IEEE_BINARY32 && _GLIBCXX_DOUBLE_IS_IEEE_BINARY64 \
&& __SIZE_WIDTH__ >= 32
# define USE_LIB_FAST_FLOAT 1
# if __LDBL_MANT_DIG__ == __DBL_MANT_DIG__
# undef USE_STRTOD_FOR_FROM_CHARS