aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 20eda9b..a244c8a 100644
--- a/eval.c
+++ b/eval.c
@@ -14,7 +14,7 @@ cast(struct expr *expr)
size = expr->type->size;
if (expr->type->prop & PROPFLOAT)
size |= F;
- else if (expr->type->basic.issigned)
+ else if (expr->type->prop & PROPINT && expr->type->basic.issigned)
size |= S;
switch (size) {
case 1: expr->constant.i = (uint8_t)expr->constant.i; break;
@@ -33,7 +33,7 @@ binary(struct expr *expr, enum tokenkind op, struct expr *l, struct expr *r)
expr->kind = EXPRCONST;
if (l->type->prop & PROPFLOAT)
op |= F;
- else if (l->type->basic.issigned)
+ else if (l->type->prop & PROPINT && l->type->basic.issigned)
op |= S;
switch (op) {
case TMUL: