aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-01-09 10:45:31 +0000
committerJonathan Wakely <jwakely@redhat.com>2023-01-10 10:09:21 +0000
commit769fae76dfd71045fe062e7b1edef0f59e50371d (patch)
tree0a4e4956a77b42b8093ec509854130f74f538bab /gcc/fortran
parentb39f4333d18cc58b1a655c537a78fefe95b82609 (diff)
downloadgcc-769fae76dfd71045fe062e7b1edef0f59e50371d.zip
gcc-769fae76dfd71045fe062e7b1edef0f59e50371d.tar.gz
gcc-769fae76dfd71045fe062e7b1edef0f59e50371d.tar.bz2
libstdc++: Fix some algos for 16-bit size_t [PR108221]
Some standard algorithms fail to compile when size_t or ptrdiff_t is narrower than int. The __lg helper function is ambiguous if ptrdiff_t is short or __int20, so replace it with a function template that works for those types as well as signed/unsigned int/long/long long. The helpers for stable_sort perform arithmetic on size values and assume the types won't change, which isn't true if the type promotes to int. libstdc++-v3/ChangeLog: PR libstdc++/108221 * include/bits/stl_algobase.h (__lg): Replace six overloads with a single function template for all integer types. * include/bits/stl_algo.h (__merge_adaptive_resize): Cast arithmetic results back to _Distance.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions