aboutsummaryrefslogtreecommitdiff
path: root/stmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmt.c')
-rw-r--r--stmt.c2
1 files changed, 1 insertions, 1 deletions
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");