mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 20:50:42 +00:00
handle addresses of void defs
This commit is contained in:
parent
e957dc798f
commit
8099f0d8f2
2 changed files with 5 additions and 5 deletions
|
@ -342,13 +342,13 @@ emit_move_expr (expr_t *e)
|
|||
if (dst_type->type == ev_struct && src_type->type == ev_struct) {
|
||||
size_expr = new_short_expr (type_size (dst->type));
|
||||
} else if (dst_type->type == ev_struct) {
|
||||
//if (dst->alias)
|
||||
// dst = dst->alias;
|
||||
if (dst->alias)
|
||||
dst = dst->alias;
|
||||
dst = emit_sub_expr (address_expr (new_def_expr (dst), 0, 0), 0);
|
||||
size_expr = new_integer_expr (type_size (dst_type));
|
||||
} else if (src_type->type == ev_struct) {
|
||||
//if (src->alias)
|
||||
// src = src->alias;
|
||||
if (src->alias)
|
||||
src = src->alias;
|
||||
src = emit_sub_expr (address_expr (new_def_expr (src), 0, 0), 0);
|
||||
size_expr = new_integer_expr (type_size (dst_type->aux_type));
|
||||
} else {
|
||||
|
|
|
@ -2097,7 +2097,7 @@ address_expr (expr_t *e1, expr_t *e2, type_t *t)
|
|||
e->e.pointer.val = 0;
|
||||
e->e.pointer.type = t;
|
||||
e->e.pointer.def = def;
|
||||
} else if (type->type == ev_array) {
|
||||
} else if (type->type == ev_array || type->type == ev_void) {
|
||||
e = e1;
|
||||
e->type = ex_pointer;
|
||||
e->e.pointer.val = 0;
|
||||
|
|
Loading…
Reference in a new issue