Commit 982a975e by Richard Stallman

(primary): In statement expression case,

if compstmt returns something other than a BLOCK,
return it unchanged.

From-SVN: r4838
parent 5d5c8541
...@@ -727,13 +727,18 @@ end ifobjc ...@@ -727,13 +727,18 @@ end ifobjc
/* The statements have side effects, so the group does. */ /* The statements have side effects, so the group does. */
TREE_SIDE_EFFECTS (rtl_exp) = 1; TREE_SIDE_EFFECTS (rtl_exp) = 1;
/* Make a BIND_EXPR for the BLOCK already made. */ if (TREE_CODE ($3) == BLOCK)
$$ = build (BIND_EXPR, TREE_TYPE (rtl_exp), {
NULL_TREE, rtl_exp, $3); /* Make a BIND_EXPR for the BLOCK already made. */
/* Remove the block from the tree at this point. $$ = build (BIND_EXPR, TREE_TYPE (rtl_exp),
It gets put back at the proper place NULL_TREE, rtl_exp, $3);
when the BIND_EXPR is expanded. */ /* Remove the block from the tree at this point.
delete_block ($3); It gets put back at the proper place
when the BIND_EXPR is expanded. */
delete_block ($3);
}
else
$$ = $3;
} }
| primary '(' exprlist ')' %prec '.' | primary '(' exprlist ')' %prec '.'
{ $$ = build_function_call ($1, $3); } { $$ = build_function_call ($1, $3); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment