mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
libstdc++: Fix -Wparentheses warning in std::mul_sat
libstdc++-v3/ChangeLog: * include/bits/sat_arith.h (mul_sat): Add parentheses around operands.
This commit is contained in:
committed by
Jonathan Wakely
parent
20bf909f18
commit
2f399316fc
@@ -87,7 +87,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
return __z;
|
||||
if constexpr (is_unsigned_v<_Tp>)
|
||||
return __gnu_cxx::__int_traits<_Tp>::__max;
|
||||
else if (__x < 0 != __y < 0)
|
||||
else if ((__x < 0) != (__y < 0))
|
||||
return __gnu_cxx::__int_traits<_Tp>::__min;
|
||||
else
|
||||
return __gnu_cxx::__int_traits<_Tp>::__max;
|
||||
|
||||
Reference in New Issue
Block a user