From c78d15b331f830118a27726b522765d985f94624 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 6 Mar 2011 16:05:38 +0900 Subject: [PATCH] Support taking the address of block expressions that have a result. --- tools/qfcc/source/expr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index 206d125e0..c78fd4d34 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -2129,6 +2129,10 @@ 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); default: return error (e1, "invalid type for unary &"); }