https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104772
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:6261d10521f9fdc2a43d54b4dc365025288aa8e9 commit r14-1582-g6261d10521f9fdc2a43d54b4dc365025288aa8e9 Author: Jonathan Wakely <jwak...@redhat.com> Date: Mon Jun 5 16:14:29 2023 +0100 libstdc++: Make std::numeric_limits<__float128> more portable [PR104772] This redefines std::numeric_limits<__float128> so that it works with non-GCC compilers. The previous definition didn't work with Clang, due to it not supporting __builtin_high_valq, __builtin_nanq, and __builtin_nansq. It also didn't work in strict modes, due to using Q literal suffixes. The new definition uses the Q suffixes when supported, or calculates the correct values using __float128 arithmetic from double values. Ideally the values would be defined as hexadecimal-floating-point-literals, but that won't work for C++14 and older. The only member that can't be defined this way is signaling_NaN() which still requires a built-in. If __builtin_nansq is not supported, try to use __builtin_nansf128 (with a possibly-redundant bit_cast) and if that isn't supported, return a quiet NaN and define has_signaling_NaN and is_iec754 to be false. libstdc++-v3/ChangeLog: PR libstdc++/104772 * include/std/limits: (numeric_limits<__float128>): Define for __STRICT_ANSI__ as well. * testsuite/18_support/numeric_limits/128bit.cc: Remove check for __STRICT_ANSI__. Co-authored-by: Jakub Jelinek <ja...@redhat.com>