diff options
Diffstat (limited to 'bootstrap/fold.c')
| -rw-r--r-- | bootstrap/fold.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |