From a98385a607aafe373c14d2a6fb2778d21a600c30 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Tue, 23 Apr 2019 21:22:25 -0700 Subject: Fix integer promotion on bit-fields Fixes #47. --- stmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stmt.c') diff --git a/stmt.c b/stmt.c index 4033a69..c53c969 100644 --- a/stmt.c +++ b/stmt.c @@ -127,7 +127,7 @@ stmt(struct func *f, struct scope *s) if (!(e->type->prop & PROPINT)) error(&tok.loc, "controlling expression of switch statement must have integer type"); - e = exprconvert(e, typeintpromote(e->type)); + e = exprpromote(e); label[0] = mkblock("switch_cond"); label[1] = mkblock("switch_join"); -- cgit v1.2.3