[Bug libstdc++/123180] [16 Regression] -Wnonnull with std::ranges::stable_sort
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 18 13:47:51 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123180
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:630c1bfbb5bc3ba9fafca5e97096263ab8f0a04b
commit r16-6246-g630c1bfbb5bc3ba9fafca5e97096263ab8f0a04b
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Dec 18 10:38:31 2025 +0000
libstdc++: Fix ranges::stable_sort handling of null buffer [PR123180]
The logic of the null pointer check got reversed when converting the
std::stable_sort code for ranges::stable_sort.
libstdc++-v3/ChangeLog:
PR libstdc++/123180
* include/bits/ranges_algo.h (__stable_sort_fn::operator()): Fix
sense of null check. Replace typedef with alias-declaration.
* testsuite/25_algorithms/stable_sort/123180.cc: New test.
Reviewed-by: Patrick Palka <ppalka@redhat.com>
More information about the Gcc-bugs
mailing list