mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 14:50:57 +08:00
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.
This commit is contained in:
parent
5e1031ff8e
commit
edf6fe7800
@ -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) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user