From 6608c8a1f66c4f007bfd48e14b8c058252665177 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 14 Mar 2020 13:14:25 +0900 Subject: [PATCH] Revert "Support taking the address of block expressions that have a result." This reverts commit c78d15b331f830118a27726b522765d985f94624. 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. --- tools/qfcc/source/expr.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index 70e4b2076..72624364c 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -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: