(truthvalue_conversion, BIT_AND_EXPR): Make sure that the result has
boolean_type_node. From-SVN: r9844
This commit is contained in:
parent
a0ab04225b
commit
58cee64304
|
@ -2103,8 +2103,11 @@ truthvalue_conversion (expr)
|
|||
TREE_OPERAND (expr, 1))), 1);
|
||||
|
||||
case BIT_AND_EXPR:
|
||||
if (integer_onep (TREE_OPERAND (expr, 1)))
|
||||
return expr;
|
||||
if (integer_onep (TREE_OPERAND (expr, 1))
|
||||
&& TREE_TYPE (expr) != boolean_type_node)
|
||||
/* Using convert here would cause infinite recursion. */
|
||||
return build1 (NOP_EXPR, boolean_type_node, expr);
|
||||
break;
|
||||
|
||||
case MODIFY_EXPR:
|
||||
if (warn_parentheses && C_EXP_ORIGINAL_CODE (expr) == MODIFY_EXPR)
|
||||
|
|
Loading…
Reference in New Issue