8sa1-gcc/libstdc++-v3/include/std
Patrick Palka 6a31d47e27 libstdc++: Disable floating-point std::to_chars on unsupported targets
This patch conditionally disables the floating-point std::to_chars
implementation on targets whose float and double aren't IEEE binary32
and binary64, until a proper fallback can be added for such targets.
This fixes a bootstrap failure on non-IEEE-754 FP targets such as
vax-netbsdelf.

The new preprocessor tests in c++config that detect the binary32 and
binary64 formats were copied from gcc/testsuite/gcc.dg/float-exact-1.c.

libstdc++-v3/ChangeLog:

	* include/bits/c++config (_GLIBCXX_FLOAT_IS_IEEE_BINARY_32):
	Define this macro.
	(_GLIBCXX_DOUBLE_IS_IEEE_BINARY_64): Likewise.
	* include/std/charconv (to_chars): Use these macros to
	conditionally hide the overloads for floating-point types.
	* src/c++17/floating_to_chars.cc: Use the macros to
	conditionally disable this file.
	(floating_type_traits<float>): Remove redundant static assert.
	(floating_type_traits<double>): Likewise.
	* testsuite/20_util/to_chars/double.cc: Run this test only on
	ieee-floats effective targets.
	* testsuite/20_util/to_chars/float.cc: Likewise.
	* testsuite/20_util/to_chars/long_double.cc: Likewise.
	* testsuite/lib/libstdc++.exp
	(check_effective_target_ieee-floats): Define new proc for
	detecting whether float and double have the IEEE binary32 and
	binary64 formats.
2020-12-21 15:15:36 -05:00
..
algorithm libstdc++: Implement C++20 constrained algorithms 2020-02-06 20:08:34 -05:00
any libstdc++: Fix constructor constraints for std::any (PR 90415) 2020-04-24 00:54:20 +01:00
array libstdc++: Disable std::array assertions for C++11 constexpr 2020-12-03 17:08:01 +00:00
atomic Add feature test macro for atomic<T>::wait 2020-12-01 15:43:17 -08:00
bit libstdc++: Remove redundant branches in countl_one and countr_one [PR 98226] 2020-12-10 21:57:42 +00:00
bitset libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
charconv libstdc++: Disable floating-point std::to_chars on unsupported targets 2020-12-21 15:15:36 -05:00
chrono libstdc++: Fix arithmetic bug in year_month_weekday conversion [PR96713] 2020-10-28 12:28:08 -04:00
codecvt Update copyright years. 2020-01-01 12:51:42 +01:00
complex libstdc++: Fix -Wmismatched-tags warnings (PR 96063) 2020-07-06 17:12:29 +01:00
concepts libstdc++: Fix typos in copyright notice 2020-10-15 19:20:21 +01:00
condition_variable libstdc++: Encapsulate __gthread_cond_t as std::__condvar 2020-11-25 18:24:13 +00:00
coroutine libstdc++: Define noop coroutine details private and inline [PR 95917] 2020-10-20 11:37:48 +01:00
deque libstdc++: Update __cpp_lib_erase_if macro (P1115R3) 2020-02-15 10:25:23 +00:00
execution libstdc++: Define __cpp_lib_execution feature test macro 2020-04-22 22:54:35 +01:00
filesystem Update copyright years. 2020-01-01 12:51:42 +01:00
forward_list libstdc++: Update __cpp_lib_erase_if macro (P1115R3) 2020-02-15 10:25:23 +00:00
fstream libstdc++: Override BUFSIZ for Windows targets [PR 94268] 2020-10-28 13:19:21 +00:00
functional libstdc++: Remove <debug/array> 2020-11-09 21:20:01 +01:00
future libstdc++: Move std::thread to a new header 2020-11-19 13:36:15 +00:00
iomanip Update copyright years. 2020-01-01 12:51:42 +01:00
ios Update copyright years. 2020-01-01 12:51:42 +01:00
iosfwd Update copyright years. 2020-01-01 12:51:42 +01:00
iostream libstdc++: Remove init_priority attribute for Init object [PR 98108] 2020-12-15 18:40:28 +00:00
istream libstdc++: Adjust overflow prevention to operator>> 2020-08-06 18:26:45 +01:00
iterator Update copyright years. 2020-01-01 12:51:42 +01:00
latch Add feature test macro for atomic<T>::wait 2020-12-01 15:43:17 -08:00
limits libstdc++: Make __int128 meet integer-class requirements [PR 96042] 2020-08-19 16:49:07 +01:00
list libstdc++: Update __cpp_lib_erase_if macro (P1115R3) 2020-02-15 10:25:23 +00:00
locale Update copyright years. 2020-01-01 12:51:42 +01:00
map Update copyright years. 2020-01-01 12:51:42 +01:00
memory libstdc++: Reduce header dependencies in and on <memory> 2020-10-22 18:42:03 +01:00
memory_resource libstdc++: Ensure std::forward_as_tuple is defined 2020-10-23 01:12:00 +01:00
mutex libstdc++: Rewrite std::call_once to use futexes [PR 66146] 2020-11-03 18:44:49 +00:00
numbers Update copyright years. 2020-01-01 12:51:42 +01:00
numeric libstdc++: Minor header cleanup in <numeric> 2020-10-05 22:46:46 +01:00
optional libstdc++: Fix constraints on std::optional comparisons [PR 96269] 2020-11-05 19:09:22 +00:00
ostream libstdc++: Implement std::emit_on_flush etc. 2020-11-11 00:19:40 +00:00
queue Update copyright years. 2020-01-01 12:51:42 +01:00
random Update copyright years. 2020-01-01 12:51:42 +01:00
ranges libstdc++: Fix ranges::join_view::_Iterator::operator-> [LWG 3500] 2020-11-18 10:23:57 -05:00
ratio Update copyright years. 2020-01-01 12:51:42 +01:00
regex libstdc++: Remove <memory_resource> dependency from <regex> [PR 92546] 2020-11-20 13:06:48 +00:00
scoped_allocator libstdc++: Reduce header dependencies in and on <memory> 2020-10-22 18:42:03 +01:00
semaphore libstdc++: Fix indentation in <semaphore> 2020-12-20 18:49:46 +00:00
set Update copyright years. 2020-01-01 12:51:42 +01:00
shared_mutex libstdc++: Only include <condition_variable> in <shared_mutex> if needed 2020-10-22 18:49:38 +01:00
source_location libtdc++: Define std::source_location for C++20 2020-12-03 19:17:13 +00:00
span libstdc++: Remove <debug/array> 2020-11-09 21:20:01 +01:00
sstream libstdc++: Reorder constructors in <sstream> 2020-11-10 19:22:48 +00:00
stack Update copyright years. 2020-01-01 12:51:42 +01:00
stdexcept Update copyright years. 2020-01-01 12:51:42 +01:00
stop_token libstdc++: Add new headers to stdc++.h 2020-11-26 11:25:55 +00:00
streambuf libstdc++: Add deprecated attributes to old iostream members 2020-08-19 12:13:23 +01:00
string libstdc++: Update __cpp_lib_erase_if macro (P1115R3) 2020-02-15 10:25:23 +00:00
string_view libstdc++: Reduce uses of std::numeric_limits 2020-10-06 00:05:11 +01:00
syncstream libstdc++: Implement std::emit_on_flush etc. 2020-11-11 00:19:40 +00:00
system_error libstdc++: Fix -Wmismatched-tags warnings (PR 96063) 2020-07-06 17:12:29 +01:00
thread libstdc++: Move std::hash<std:🧵:id> to <bits/std_thread.h> 2020-12-17 14:03:00 +00:00
tuple libstdc++: Use reserved name for C++20 attribute 2020-10-19 18:07:21 +01:00
type_traits libstdc++: Define type traits for wchar_t even when libc support missing 2020-11-01 11:39:07 +00:00
typeindex libstdc++: Add spaceship operator to std::type_index 2020-04-15 19:47:47 +01:00
unordered_map Update copyright years. 2020-01-01 12:51:42 +01:00
unordered_set Update copyright years. 2020-01-01 12:51:42 +01:00
utility libstdc++: Simplify built-in detection in <utility> 2020-12-16 19:25:09 +00:00
valarray libstdc++: Fix -Wmismatched-tags warnings (PR 96063) 2020-07-06 17:12:29 +01:00
variant libstdc++: Fix some warnings in headers 2020-10-29 22:47:22 +00:00
vector libstdc++: Update __cpp_lib_erase_if macro (P1115R3) 2020-02-15 10:25:23 +00:00
version libtdc++: Define std::source_location for C++20 2020-12-03 19:17:13 +00:00