diff options
author | Tomasz Kamiński <tkaminsk@redhat.com> | 2025-04-17 10:33:10 +0200 |
---|---|---|
committer | Tomasz Kamiński <tkaminsk@redhat.com> | 2025-04-17 11:56:58 +0200 |
commit | 930b504b598864ba1774eb209a748ed76b6fc7c1 (patch) | |
tree | 8691eb470530b04d2209ab74447709e0282b2945 | |
parent | 7cf5503e0af52f5b726da4274a148590c57a458a (diff) | |
download | gcc-930b504b598864ba1774eb209a748ed76b6fc7c1.zip gcc-930b504b598864ba1774eb209a748ed76b6fc7c1.tar.gz gcc-930b504b598864ba1774eb209a748ed76b6fc7c1.tar.bz2 |
libstdc++: Fixed signed comparision in _M_parse_fill_and_align [PR119840]
Explicitly cast elements of __not_fill to _CharT. Only '{' and ':'
are used as `__not_fill`, so they are never negative.
PR libstdc++/119840
libstdc++-v3/ChangeLog:
* include/std/format (_M_parse_fill_and_align): Cast elements of
__not_fill to _CharT.
-rw-r--r-- | libstdc++-v3/include/std/format | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format index f3fd837..e557e10 100644 --- a/libstdc++-v3/include/std/format +++ b/libstdc++-v3/include/std/format @@ -555,8 +555,8 @@ namespace __format constexpr iterator _M_parse_fill_and_align(iterator __first, iterator __last, string_view __not_fill) noexcept { - for (char c : __not_fill) - if (*__first == c) + for (char __c : __not_fill) + if (*__first == static_cast<_CharT>(__c)) return __first; using namespace __unicode; |