Alias value expressions by aliasing the value.

This keeps constant expressions constant, even through aliasing.
This commit is contained in:
Bill Currie 2012-12-23 19:31:09 +09:00
parent b295524385
commit 22db05dc9c

View file

@ -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')