harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e0799f90f9926771a95fe9929364600be94a2569
parent 06c6349a933e1968ea1d74eaac3fcba36330dbc3
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Sat, 17 Apr 2021 21:30:10 -0400

eval: implement casts to pointers

Diffstat:
Msrc/eval.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/eval.c b/src/eval.c @@ -360,7 +360,10 @@ eval_cast(struct context *ctx, struct expression *in, struct expression *out) out->constant.uval = 0; return EVAL_OK; } - assert(0); // TODO + assert(from->storage == STORAGE_POINTER + || from->storage == STORAGE_UINTPTR); + out->constant.uval = val.constant.uval; + return EVAL_OK; case STORAGE_I16: case STORAGE_I32: case STORAGE_I64: