diff options
author | Patrick Palka <ppalka@redhat.com> | 2022-09-13 10:41:47 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2022-09-13 10:41:47 -0400 |
commit | edf6fe7800369136c1a8ddcaf75a042a3a938c84 (patch) | |
tree | 892b5de9699842c065bdf023746651fef26b877b | |
parent | 5e1031ff8ec542f14551624e8df6db450794e93e (diff) | |
download | gcc-edf6fe7800369136c1a8ddcaf75a042a3a938c84.zip gcc-edf6fe7800369136c1a8ddcaf75a042a3a938c84.tar.gz gcc-edf6fe7800369136c1a8ddcaf75a042a3a938c84.tar.bz2 |
libstdc++: Avoid -Wparentheses warning with debug iterators
I noticed compiling e.g. std/ranges/adaptors/join.cc with
-D_GLIBCXX_DEBUG -Wsystem-headers -Wall gives the warning:
gcc/libstdc++-v3/include/debug/safe_iterator.h:477:9: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
libstdc++-v3/ChangeLog:
* include/debug/safe_iterator.h (_GLIBCXX_DEBUG_VERIFY_OPERANDS):
Add parentheses to avoid -Wparentheses warning.
-rw-r--r-- | libstdc++-v3/include/debug/safe_iterator.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/debug/safe_iterator.h b/libstdc++-v3/include/debug/safe_iterator.h index 33f7a86..117dc93 100644 --- a/libstdc++-v3/include/debug/safe_iterator.h +++ b/libstdc++-v3/include/debug/safe_iterator.h @@ -40,7 +40,7 @@ #endif #define _GLIBCXX_DEBUG_VERIFY_OPERANDS(_Lhs, _Rhs, _BadMsgId, _DiffMsgId) \ - _GLIBCXX_DEBUG_VERIFY(!_Lhs._M_singular() && !_Rhs._M_singular() \ + _GLIBCXX_DEBUG_VERIFY((!_Lhs._M_singular() && !_Rhs._M_singular()) \ || (_Lhs._M_value_initialized() \ && _Rhs._M_value_initialized()), \ _M_message(_BadMsgId) \ |