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
This commit is contained in:
parent
4f751533e4
commit
cb3b1e7090
2 changed files with 12 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
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))
|
||||
|
|
Loading…
Add table
Reference in a new issue