+Tue Aug 24 13:48:39 1999 Nathan Sidwell <nathan@acm.org>
+
+ * expr.c (expand_expr): Cope with COND_EXPRs with one
+ non-returning branch.
+
Mon Aug 23 22:28:16 1999 Mark Mitchell <mark@codesourcery.com>
* expr.c (store_expr): Always pass down the target, even when not
jumpifnot (TREE_OPERAND (exp, 0), op0);
start_cleanup_deferral ();
- if (temp != 0)
+
+ /* One branch of the cond can be void, if it never returns. For
+ example A ? throw : E */
+ if (temp != 0
+ && TREE_TYPE (TREE_OPERAND (exp, 1)) != void_type_node)
store_expr (TREE_OPERAND (exp, 1), temp, 0);
else
expand_expr (TREE_OPERAND (exp, 1),
emit_barrier ();
emit_label (op0);
start_cleanup_deferral ();
- if (temp != 0)
+ if (temp != 0
+ && TREE_TYPE (TREE_OPERAND (exp, 2)) != void_type_node)
store_expr (TREE_OPERAND (exp, 2), temp, 0);
else
expand_expr (TREE_OPERAND (exp, 2),