+2006-09-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/28899
+ * gimplify.c (gimplify_modify_expr_rhs) [BIND_EXPR]: Handle
+ want_value.
+
+ * gimplify.c (voidify_wrapper_expr): Handle null type.
+
2006-09-01 Josh Conner <jconner@apple.com>
PR c++/25505
tree
voidify_wrapper_expr (tree wrapper, tree temp)
{
- if (!VOID_TYPE_P (TREE_TYPE (wrapper)))
+ tree type = TREE_TYPE (wrapper);
+ if (type && !VOID_TYPE_P (type))
{
- tree type = TREE_TYPE (wrapper);
tree *p;
/* Set p to point to the body of the wrapper. Loop until we find
case STATEMENT_LIST:
{
tree wrap = *from_p;
- tree t = voidify_wrapper_expr (wrap, *expr_p);
+ tree t;
+
+ ret = gimplify_expr (to_p, pre_p, post_p,
+ is_gimple_min_lval, fb_lvalue);
+ if (ret != GS_ERROR)
+ ret = GS_OK;
+
+ t = voidify_wrapper_expr (wrap, *expr_p);
gcc_assert (t == *expr_p);
- *expr_p = wrap;
+ if (want_value)
+ {
+ gimplify_and_add (wrap, pre_p);
+ *expr_p = unshare_expr (*to_p);
+ }
+ else
+ *expr_p = wrap;
return GS_OK;
}