Commit 3f783329 by Richard Stallman

(invert_truthvalue): Never alter ARG.

From-SVN: r2365
parent abd09f97
...@@ -1979,8 +1979,8 @@ omit_one_operand (type, result, omitted) ...@@ -1979,8 +1979,8 @@ omit_one_operand (type, result, omitted)
return t; return t;
} }
/* Return a simplified tree node for the truth-negation of ARG /* Return a simplified tree node for the truth-negation of ARG. This
(perhaps by altering ARG). It is known that ARG is an operation that never alters ARG itself. We assume that ARG is an operation that
returns a truth value (0 or 1). */ returns a truth value (0 or 1). */
tree tree
...@@ -2000,10 +2000,8 @@ invert_truthvalue (arg) ...@@ -2000,10 +2000,8 @@ invert_truthvalue (arg)
&& code != NE_EXPR && code != EQ_EXPR) && code != NE_EXPR && code != EQ_EXPR)
return build1 (TRUTH_NOT_EXPR, type, arg); return build1 (TRUTH_NOT_EXPR, type, arg);
else else
{ return build (invert_tree_comparison (code),
TREE_SET_CODE (arg, invert_tree_comparison (code)); TREE_OPERAND (arg, 0), TREE_OPERAND (arg, 1));
return arg;
}
} }
switch (code) switch (code)
......
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