diff options
author | Michael Forney <mforney@mforney.org> | 2019-04-23 21:22:25 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-04-23 21:23:19 -0700 |
commit | a98385a607aafe373c14d2a6fb2778d21a600c30 (patch) | |
tree | 2b4c71cfb8f7ceab26e65f4489905a85488f6791 /stmt.c | |
parent | e0b772b836265b77686e9a7aa8ad01bb1fca53e7 (diff) |
Fix integer promotion on bit-fields
Fixes #47.
Diffstat (limited to 'stmt.c')
-rw-r--r-- | stmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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"); |