mirror of
https://github.com/openRuyi-Project/gcc.git
synced 2026-10-04 07:58:26 +00:00
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.
This commit is contained in:
@@ -64,7 +64,7 @@ template <typename _Abi, typename>
|
||||
__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;
|
||||
|
||||
Reference in New Issue
Block a user