From 22db05dc9c5157f7f632a3a670d4343df29ab902 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 23 Dec 2012 19:31:09 +0900 Subject: [PATCH] Alias value expressions by aliasing the value. This keeps constant expressions constant, even through aliasing. --- tools/qfcc/source/expr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index 1f2781250..b296524ee 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -877,6 +877,8 @@ new_alias_expr (type_t *type, expr_t *expr) { expr_t *alias; + if (expr->type == ex_value) + return new_value_expr (alias_value (expr->e.value, type)); alias = new_unary_expr ('A', expr); alias->e.expr.type = type; //if (expr->type == ex_uexpr && expr->e.expr.op == 'A')