From: Jonathan Wakely Date: Wed, 1 Oct 2025 12:53:14 +0000 (+0100) Subject: libstdc++: Fix -Wparentheses warning in std::mul_sat X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f399316fca1cadfde3d9e8af92e029ef00bc2da;p=thirdparty%2Fgcc.git libstdc++: Fix -Wparentheses warning in std::mul_sat libstdc++-v3/ChangeLog: * include/bits/sat_arith.h (mul_sat): Add parentheses around operands. --- diff --git a/libstdc++-v3/include/bits/sat_arith.h b/libstdc++-v3/include/bits/sat_arith.h index 97545d272ca..e036fc88e40 100644 --- a/libstdc++-v3/include/bits/sat_arith.h +++ b/libstdc++-v3/include/bits/sat_arith.h @@ -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;