Commit cb3b1e70 by Roger Sayle Committed by Roger Sayle

c-common.c (c_common_truthvalue_conversion): Use fold_build2 instead of build_binary_op when...


	* c-common.c (c_common_truthvalue_conversion): Use fold_build2
	instead of build_binary_op when performing code transformations
	to avoid error messages about constructs not it the user's code.

From-SVN: r99791
parent 4f751533
2005-05-16 Roger Sayle <roger@eyesopen.com>
* c-common.c (c_common_truthvalue_conversion): Use fold_build2
instead of build_binary_op when performing code transformations
to avoid error messages about constructs not it the user's code.
2005-05-16 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa-pre.c: Fix a comment typo.
......
......@@ -2462,12 +2462,12 @@ c_common_truthvalue_conversion (tree expr)
two objects. */
if (TREE_TYPE (TREE_OPERAND (expr, 0))
== TREE_TYPE (TREE_OPERAND (expr, 1)))
return build_binary_op (NE_EXPR, TREE_OPERAND (expr, 0),
TREE_OPERAND (expr, 1), 1);
return build_binary_op (NE_EXPR, TREE_OPERAND (expr, 0),
fold (build1 (NOP_EXPR,
TREE_TYPE (TREE_OPERAND (expr, 0)),
TREE_OPERAND (expr, 1))), 1);
return fold_build2 (NE_EXPR, truthvalue_type_node,
TREE_OPERAND (expr, 0), TREE_OPERAND (expr, 1));
return fold_build2 (NE_EXPR, truthvalue_type_node,
TREE_OPERAND (expr, 0),
fold_convert (TREE_TYPE (TREE_OPERAND (expr, 0)),
TREE_OPERAND (expr, 1)));
case BIT_AND_EXPR:
if (integer_onep (TREE_OPERAND (expr, 1))
......
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