diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2025-05-16 13:05:51 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2025-05-27 12:11:43 +0100 |
commit | e0c3066c14ad98d130ddd1183be3caaeea19c63b (patch) | |
tree | d89f56e019aca6bee8ab5028bab18b12a02425fc /libgcc | |
parent | 351e60095cfaa73b5ac69222d00e0cd4ae5725d4 (diff) | |
download | gcc-e0c3066c14ad98d130ddd1183be3caaeea19c63b.zip gcc-e0c3066c14ad98d130ddd1183be3caaeea19c63b.tar.gz gcc-e0c3066c14ad98d130ddd1183be3caaeea19c63b.tar.bz2 |
libstdc++: Support std::abs for 128-bit integers and floats [PR96710]
Currently we only provide std::abs(__int128) and std::abs(__float128)
for non-strict modes, i.e. -std=gnu++NN but not -std=c++NN.
This defines those overloads for strict modes too, as a small step
towards resolving PR 96710 (which will eventually mean that __int128
satisfies the std::integral concept).
libstdc++-v3/ChangeLog:
PR libstdc++/96710
* include/bits/std_abs.h [__SIZEOF_INT128__] (abs(__int128)):
Define.
[_GLIBCXX_USE_FLOAT128] (abs(__float128)): Enable definition for
strict modes.
* testsuite/26_numerics/headers/cmath/82644.cc: Use strict_std
instead of defining __STRICT_ANSI__.
* testsuite/26_numerics/headers/cstdlib/abs128.cc: New test.
Reviewed-by: Tomasz KamiĆski <tkaminsk@redhat.com>
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions