aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-11-14 10:56:57 +0000
committerJonathan Wakely <jwakely@redhat.com>2023-11-14 22:32:08 +0000
commit1c15303375f7089ff985b085ab877b11ebfbc4b7 (patch)
treeb6ab3ced8878832d2fc31a4e183e6c464f497252 /libcpp
parent6f2fc42d9e52e8322e718e0154cd235d00906f99 (diff)
downloadgcc-1c15303375f7089ff985b085ab877b11ebfbc4b7.zip
gcc-1c15303375f7089ff985b085ab877b11ebfbc4b7.tar.gz
gcc-1c15303375f7089ff985b085ab877b11ebfbc4b7.tar.bz2
libstdc++: Fix <charconv> uses of signed types with <bit> functions
In <charconv> we pass the int __base parameter to our internal versions of <bit> functions, __bit_width and __countr_zero. Those functions are only defined for unsigned types, so we need to convert the base to unsigned. The base must be in the range [2,36] so we can mask off the low bits and then convert that to unsigned, so that we don't need to care about negative values becoming large unsigned values. libstdc++-v3/ChangeLog: * include/std/charconv (__from_chars_pow2_base): Convert base to unsigned for call to __countr_zero. (__from_chars_alnum): Likewise for call to __bit_width.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions