]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix invalid signed arguments to <bit> functions
authorJonathan Wakely <jwakely@redhat.com>
Thu, 13 Feb 2025 09:40:44 +0000 (09:40 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 20 Feb 2025 11:33:41 +0000 (11:33 +0000)
commit32457bc25fea80b7bfb2f572e3e163b1dc359969
tree94c468d42235bff1174f607f261425a9842d3346
parent29eb6f8f41e0530f7ecb93cb66d3a35e0344bc1d
libstdc++: Fix invalid signed arguments to <bit> functions

These should have been unsigned, but the static assertions are only in
the public std::bit_ceil and std::bit_width functions, not the internal
__bit_ceil and __bit_width ones.

libstdc++-v3/ChangeLog:

* include/experimental/bits/simd.h (__find_next_valid_abi): Cast
__bit_ceil argument to unsigned.
* src/c++17/floating_from_chars.cc (__floating_from_chars_hex):
Cast __bit_ceil argument to unsigned.
* src/c++17/memory_resource.cc (big_block): Cast __bit_width
argument to unsigned.
libstdc++-v3/include/experimental/bits/simd.h
libstdc++-v3/src/c++17/floating_from_chars.cc
libstdc++-v3/src/c++17/memory_resource.cc