summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 0ce09a3..474e9ee 100644
--- a/eval.c
+++ b/eval.c
@@ -1152,6 +1152,12 @@ static Status eval_expr(Evaluator *ev, Expression *e, Value *v) {
default: assert(0); break;
}
break;
+ case UNARY_SIZEOF:
+ v->i64 = (I64)compiler_sizeof(of.type);
+ break;
+ case UNARY_ALIGNOF:
+ v->i64 = (I64)compiler_alignof(of.type);
+ break;
case UNARY_DSIZEOF:
case UNARY_DALIGNOF:
case UNARY_TYPEOF: