2005-06-07 Richard Guenther <rguenth@gcc.gnu.org>
* c-typeck.c (c_finish_if_stmt): Use void_type_node as type
for COND_EXPR.
* gimplify.c (gimplify_cond_expr): No need to fix up the
type of COND_EXPRs.
From-SVN: r100705
+2005-06-07 Richard Guenther <rguenth@gcc.gnu.org>
+
+ * c-typeck.c (c_finish_if_stmt): Use void_type_node as type
+ for COND_EXPR.
+ * gimplify.c (gimplify_cond_expr): No need to fix up the
+ type of COND_EXPRs.
+
2005-06-07 Richard Guenther <rguenth@gcc.gnu.org>
* tree-ssa.c (tree_ssa_useless_type_conversion_1): Fix
}
}
- stmt = build3 (COND_EXPR, NULL_TREE, cond, then_block, else_block);
+ stmt = build3 (COND_EXPR, void_type_node, cond, then_block, else_block);
SET_EXPR_LOCATION (stmt, if_locus);
add_stmt (stmt);
}
enum gimplify_status ret;
type = TREE_TYPE (expr);
- if (!type)
- TREE_TYPE (expr) = void_type_node;
/* If this COND_EXPR has a value, copy the values into a temporary within
the arms. */
- else if (! VOID_TYPE_P (type))
+ if (! VOID_TYPE_P (type))
{
tree result;