From a4ddca68662f4bc0531763357b4bc00b6c50b456 Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 13 Aug 2022 13:00:37 +0200 Subject: target --- bootstrap/fold.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bootstrap/fold.c') diff --git a/bootstrap/fold.c b/bootstrap/fold.c index efe1f83..cd72415 100644 --- a/bootstrap/fold.c +++ b/bootstrap/fold.c @@ -5,9 +5,9 @@ int fold(struct expr *ex); static void numcast(struct expr *ex, const struct type *to) { - enum typetype t0 = ex->ty->t; enum typetype t1 = to->t; - const struct type *from = ex->ty; + const struct type *from = ex->ty->t == TYenum ? ex->ty->enu.intty : ex->ty; + enum typetype t0 = from->t; const struct type *uto = unconstify(to); const struct type *ufrom = unconstify(from); int size = to->size; -- cgit v1.2.3