(primary): In statement expression case,

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

From-SVN: r4838
This commit is contained in:
Richard Stallman 1993-07-04 06:56:42 +00:00
parent 5d5c854105
commit 982a975ec6
1 changed files with 12 additions and 7 deletions

View File

@ -727,13 +727,18 @@ end ifobjc
/* The statements have side effects, so the group does. */
TREE_SIDE_EFFECTS (rtl_exp) = 1;
/* Make a BIND_EXPR for the BLOCK already made. */
$$ = build (BIND_EXPR, TREE_TYPE (rtl_exp),
NULL_TREE, rtl_exp, $3);
/* Remove the block from the tree at this point.
It gets put back at the proper place
when the BIND_EXPR is expanded. */
delete_block ($3);
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);
/* Remove the block from the tree at this point.
It gets put back at the proper place
when the BIND_EXPR is expanded. */
delete_block ($3);
}
else
$$ = $3;
}
| primary '(' exprlist ')' %prec '.'
{ $$ = build_function_call ($1, $3); }