mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-24 19:23:00 +00:00
Support entity.field = structvar2 = structvar1;
The structvar2 = structvar1 is implemented as a move expresion, which address_expr didn't like. Return the address of the source. For indirect move expressions, this is just the source expression itself.
This commit is contained in:
parent
5cfeb7809f
commit
984aa9a4cf
1 changed files with 10 additions and 0 deletions
|
@ -2189,6 +2189,16 @@ address_expr (expr_t *e1, expr_t *e2, type_t *t)
|
|||
e->e.expr.type = pointer_type (e->e.expr.type);
|
||||
break;
|
||||
}
|
||||
if (e1->e.expr.op == 'm') {
|
||||
// direct move, so obtain the address of the source
|
||||
e = address_expr (e1->e.expr.e2, 0, t);
|
||||
break;
|
||||
}
|
||||
if (e1->e.expr.op == 'M') {
|
||||
// indirect move, so we already have the address of the source
|
||||
e = e1->e.expr.e2;
|
||||
break;
|
||||
}
|
||||
return error (e1, "invalid type for unary &");
|
||||
case ex_uexpr:
|
||||
if (e1->e.expr.op == '.') {
|
||||
|
|
Loading…
Reference in a new issue