Allow taking the address of a temporary variable

This commit is contained in:
Bill Currie 2019-06-08 13:35:47 +09:00
parent e27da9c7db
commit ebab6574b9

View file

@ -2219,6 +2219,9 @@ address_expr (expr_t *e1, expr_t *e2, type_t *t)
return e1;
case ex_label:
return new_label_ref (&e1->e.label);
case ex_temp:
e = new_unary_expr ('&', e1);
break;
default:
return error (e1, "invalid type for unary &");
}