mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
Partially implement casts.
This commit is contained in:
parent
bf626c9e00
commit
a79b6f0a6c
1 changed files with 12 additions and 2 deletions
|
@ -421,6 +421,17 @@ expr_expr (sblock_t *sblock, expr_t *e, operand_t **op)
|
|||
return sblock;
|
||||
}
|
||||
|
||||
static sblock_t *
|
||||
expr_cast (sblock_t *sblock, expr_t *e, operand_t **op)
|
||||
{
|
||||
if (!*op) {
|
||||
(*op) = new_operand (op_temp);
|
||||
(*op)->type = e->e.expr.type->type;
|
||||
}
|
||||
sblock = statement_subexpr (sblock, e->e.expr.e1, op);
|
||||
return sblock;
|
||||
}
|
||||
|
||||
static sblock_t *
|
||||
expr_uexpr (sblock_t *sblock, expr_t *e, operand_t **op)
|
||||
{
|
||||
|
@ -432,8 +443,7 @@ expr_uexpr (sblock_t *sblock, expr_t *e, operand_t **op)
|
|||
sblock = expr_deref (sblock, e, op);
|
||||
break;
|
||||
case 'C':
|
||||
//FIXME
|
||||
sblock = statement_subexpr (sblock, e->e.expr.e1, op);
|
||||
sblock = expr_cast (sblock, e, op);
|
||||
break;
|
||||
default:
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue