]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix some -Wsign-compare warnings in headers
authorJonathan Wakely <jwakely@redhat.com>
Sat, 27 Sep 2025 11:47:45 +0000 (12:47 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Sat, 27 Sep 2025 20:18:42 +0000 (21:18 +0100)
commitc2ccc43dda153ce707d39c46623b0d30ceca7db8
treed9b4cfc823fa56feacd818946c25cdd805dd1fef
parentf6c71c20792c8249b6380a4a9fd741fe1b094c9a
libstdc++: Fix some -Wsign-compare warnings in headers

In all these cases we know the value with signed type is not negative so
the cast is safe.

libstdc++-v3/ChangeLog:

* include/bits/deque.tcc (deque::_M_shrink_to_fit): Cast
difference_type to size_type to avoid -Wsign-compare warning.
* include/std/spanstream (basic_spanbuf::seekoff): Cast
streamoff to size_t to avoid -Wsign-compare warning.
libstdc++-v3/include/bits/deque.tcc
libstdc++-v3/include/std/spanstream