]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: avoid -Wsign-compare
authorJason Merrill <jason@redhat.com>
Tue, 27 Aug 2024 17:17:20 +0000 (13:17 -0400)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 2 Dec 2024 22:41:43 +0000 (22:41 +0000)
commit3a1a3ba916a6e5d795f0f07dea2bdd76c30740a1
treecc8669d726ab0088c3d5db906f13c6bf34e558f4
parent61f4509151420fcca2d92e1a382c066c2fd608a6
libstdc++: avoid -Wsign-compare

-Wsign-compare complained about these comparisons between (unsigned) size_t
and (signed) streamsize, or between (unsigned) native_handle_type
and (signed) -1.  Fixed by adding casts to unify the types.

libstdc++-v3/ChangeLog:

* include/std/istream: Add cast to avoid -Wsign-compare.
* include/std/stacktrace: Likewise.

(cherry picked from commit 4246cf4f18053eeb47cb2a241fffa9a41573916e)
libstdc++-v3/include/std/istream
libstdc++-v3/include/std/stacktrace