]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Define std::numeric_limits<_FloatNN> before C++23
authorJonathan Wakely <jwakely@redhat.com>
Mon, 7 Aug 2023 11:52:57 +0000 (12:52 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 17 Aug 2023 19:24:18 +0000 (20:24 +0100)
commit1a566fddea212a6a8e4484f7843d8e5d39b5bff0
tree339cd19f8f40904e42e9ed569f563def05cbef38
parent8ee74c5a38fa8b83705139e6b6fa4c0b445c7c5f
libstdc++: Define std::numeric_limits<_FloatNN> before C++23

The extended floating-point types such as _Float32 are supported by GCC
prior to C++23, you just can't use the standard-conforming names from
<stdfloat> to refer to them. This change defines the specializations of
std::numeric_limits for those types for older dialects, not only for
C++23.

libstdc++-v3/ChangeLog:

* include/bits/c++config (__gnu_cxx::__bfloat16_t): Define
whenever __BFLT16_DIG__ is defined, not only for C++23.
* include/std/limits (numeric_limits<bfloat16_t>): Likewise.
(numeric_limits<_Float16>, numeric_limits<_Float32>)
(numeric_limits<_Float64>): Likewise for other extended
floating-point types.
libstdc++-v3/include/bits/c++config
libstdc++-v3/include/std/limits