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,6 +727,8 @@ end ifobjc
/* The statements have side effects, so the group does. */
TREE_SIDE_EFFECTS (rtl_exp) = 1;
if (TREE_CODE ($3) == BLOCK)
{
/* Make a BIND_EXPR for the BLOCK already made. */
$$ = build (BIND_EXPR, TREE_TYPE (rtl_exp),
NULL_TREE, rtl_exp, $3);
......@@ -735,6 +737,9 @@ end ifobjc
when the BIND_EXPR is expanded. */
delete_block ($3);
}
else
$$ = $3;
}
| primary '(' exprlist ')' %prec '.'
{ $$ = build_function_call ($1, $3); }
| primary '[' expr ']' %prec '.'
......
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