On Wed, 31 May 2023 at 13:23, Jonathan Wakely via Libstdc++ <
[email protected]> wrote:
> Tested powerpc64le-linux. Pushed to trunk.
>
> -- >8 --
>
> As suggested by Jakub in the PR, this just hardcodes the constants with
> a Q suffix, since the properties of __float128 are not going to change.
>
> We can only define it for non-strict modes because the suffix gives an
> error otherwise, even in system headers:
>
> limits:2085: error: unable to find numeric literal operator 'operator""Q'
>
> libstdc++-v3/ChangeLog:
>
> PR libstdc++/104772
> * include/std/limits (numeric_limits<__float128>): Define.
> * testsuite/18_support/numeric_limits/128bit.cc: New test.
>
I should have tested this with clang before pushing:
/home/jwakely/gcc/latest/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/limits:2125:
16: error: use of undeclared identifier '__builtin_huge_valq'
{ return __builtin_huge_valq(); }
^
/home/jwakely/gcc/latest/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/limits:2129:
16: error: use of undeclared identifier '__builtin_nanq'
{ return __builtin_nanq(""); }
^
/home/jwakely/gcc/latest/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/limits:2133:
16: error: use of undeclared identifier '__builtin_nansq'
{ return __builtin_nansq(""); }
^