2008/10/25 Jakub Jelinek : > > Are you sure we don't want to warn even about the: > if (code == EQ_EXPR || code == NE_EXPR) > { > if (TREE_CODE_CLASS (code_left) == tcc_comparison > || TREE_CODE_CLASS (code_right) == tcc_comparison) > warning (OPT_Wparentheses, > "suggest parentheses around comparison in operand of %s", > code == EQ_EXPR ? "==" : "!="); > } > case if EQ_EXPR or NE_EXPR don't return boolean? Thanks. I added your suggestion. Bootstrapped and regression tested on x86_64-unknown-linux-gnu with --enable-languages=all. OK for trunk? 2008-11-04 Manuel López-Ibáñez PR c++/36921 cp/ * typeck.c (build_x_binary_op): Do not warn for overloaded comparison operators that do not return boolean. testsuite/ * g++.dg/warn/pr36921.C: New.