From 993d05b3d3a0a3c2a5c400c10243d2ce14fafc39 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 6 Mar 2011 15:58:49 +0900 Subject: [PATCH] Support taking the address of alias expressions. Taking the address of an alias expression undoes the alias but uses the aliased type. --- tools/qfcc/source/expr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index ed70764bb..206d125e0 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -2123,6 +2123,11 @@ address_expr (expr_t *e1, expr_t *e2, type_t *t) } break; } + if (e1->e.expr.op == 'A') { + if (!t) + t = e1->e.expr.type; + return address_expr (e1->e.expr.e1, e2, t); + } return error (e1, "invalid type for unary &"); default: return error (e1, "invalid type for unary &");