public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-10832] libstdc++: Resolve -Wsign-compare issue
@ 2023-05-30 20:06 Matthias Kretz
0 siblings, 0 replies; only message in thread
From: Matthias Kretz @ 2023-05-30 20:06 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:ed3debbd45e1c53631ed88ad6897c12a53e09766
commit r11-10832-ged3debbd45e1c53631ed88ad6897c12a53e09766
Author: Matthias Kretz <m.kretz@gsi.de>
Date: Thu May 25 10:45:21 2023 +0200
libstdc++: Resolve -Wsign-compare issue
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:
* include/experimental/bits/simd_ppc.h (_S_bit_shift_left):
Negative __y is UB, so prefer signed compare.
(cherry picked from commit 1a1abec1d618cde709c585fcce89330bb33b07ac)
Diff:
---
libstdc++-v3/include/experimental/bits/simd_ppc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/experimental/bits/simd_ppc.h b/libstdc++-v3/include/experimental/bits/simd_ppc.h
index f1fec53cc79..6e4a6ec606e 100644
--- a/libstdc++-v3/include/experimental/bits/simd_ppc.h
+++ b/libstdc++-v3/include/experimental/bits/simd_ppc.h
@@ -64,7 +64,7 @@ template <typename _Abi>
__x = _Base::_S_bit_shift_left(__x, __y);
if constexpr (sizeof(_Tp) < sizeof(int))
{
- if (__y >= sizeof(_Tp) * __CHAR_BIT__)
+ if (__y >= int(sizeof(_Tp) * __CHAR_BIT__))
return {};
}
return __x;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-30 20:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-30 20:06 [gcc r11-10832] libstdc++: Resolve -Wsign-compare issue Matthias Kretz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).