diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-07-26 17:23:03 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-07-27 12:47:39 +0100 |
commit | f793be787135ce7c52b169bf053af225b4828945 (patch) | |
tree | 0bf2175ac32d9c2dbaca4757af0f0da24c3da7e7 /gcc/go/go-lang.c | |
parent | 2da38b6a8896bff08db78e6587d6142b898c8730 (diff) | |
download | gcc-f793be787135ce7c52b169bf053af225b4828945.zip gcc-f793be787135ce7c52b169bf053af225b4828945.tar.gz gcc-f793be787135ce7c52b169bf053af225b4828945.tar.bz2 |
libstdc++: Fix -Wsign-compare warning in <charconv>
Cast ptrdiff_t to size_t to avoid a -Wsign-compare warning. We can check
in __to_chars_i that the ptrdiff_t won't be negative, so that we know
the cast is safe.
libstdc++-v3/ChangeLog:
* include/std/charconv (__to_chars_16, __to_chars_10)
(__to_chars_8, __to_chars_2, __to_chars): Cast ptrdiff_t to
size_t for comparison.
(__to_chars_i): Check for first >= last instead of first == last
for initial sanity check.
Diffstat (limited to 'gcc/go/go-lang.c')
0 files changed, 0 insertions, 0 deletions