expr.c (java_check_reference): Use the semantics of COND_EXPRs with void-type branches instead of using a...

* expr.c (java_check_reference): Use the semantics of COND_EXPRs
	with void-type branches instead of using a COMPOUND_EXPR.

From-SVN: r71883
This commit is contained in:
Roger Sayle 2003-09-28 15:07:05 +00:00 committed by Roger Sayle
parent 9220b1baed
commit 37e2180d7a
2 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2003-09-28 Roger Sayle <roger@eyesopen.com>
* expr.c (java_check_reference): Use the semantics of COND_EXPRs
with void-type branches instead of using a COMPOUND_EXPR.
2003-09-28 Jeff Sturm <jsturm@one-point.com>
* decl.c (java_optimize_inline, dump_function): Remove.

View File

@ -695,15 +695,13 @@ java_check_reference (tree expr, int check)
{
if (!flag_syntax_only && check)
{
tree cond;
expr = save_expr (expr);
cond = build (COND_EXPR, void_type_node,
expr = build (COND_EXPR, TREE_TYPE (expr),
build (EQ_EXPR, boolean_type_node, expr, null_pointer_node),
build (CALL_EXPR, void_type_node,
build_address_of (soft_nullpointer_node),
NULL_TREE, NULL_TREE),
empty_stmt_node);
expr = build (COMPOUND_EXPR, TREE_TYPE (expr), cond, expr);
expr);
}
return expr;