Commit 1180eb10 by Jason Merrill

*** empty log message ***

From-SVN: r9801
parent 103894f1
......@@ -2019,6 +2019,7 @@ truthvalue_conversion (expr)
case TRUTH_AND_EXPR:
case TRUTH_OR_EXPR:
case TRUTH_XOR_EXPR:
case TRUTH_NOT_EXPR:
TREE_TYPE (expr) = boolean_type_node;
return expr;
......
......@@ -4201,7 +4201,11 @@ fold (expr)
and its values must be 0 or 1.
("true" is a fixed value perhaps depending on the language,
but we don't handle values other than 1 correctly yet.) */
return invert_truthvalue (arg0);
tem = invert_truthvalue (arg0);
/* Avoid infinite recursion. */
if (TREE_CODE (tem) == TRUTH_NOT_EXPR)
return t;
return convert (type, tem);
case TRUTH_ANDIF_EXPR:
/* Note that the operands of this must be ints
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment