Revert "Support taking the address of block expressions that have a result."

This reverts commit c78d15b331.

While a block expression's result may be an l-value, block expressions
are not (and their results may not be), thus taking the address of one
is not really correct. It seems the only place that tries to do so is
the assignment code when dealing with structures.
This commit is contained in:
Bill Currie 2020-03-14 13:14:25 +09:00
parent 277ff719f5
commit 6608c8a1f6

View file

@ -2226,10 +2226,6 @@ address_expr (expr_t *e1, expr_t *e2, type_t *t)
return address_expr (e1->e.expr.e1, e2, t);
}
return error (e1, "invalid type for unary &");
case ex_block:
if (!e1->e.block.result)
return error (e1, "invalid type for unary &");
return address_expr (e1->e.block.result, e2, t);
case ex_label:
return new_label_ref (&e1->e.label);
case ex_temp: