diff options
| author | 2025-11-07 14:10:47 +0100 | |
|---|---|---|
| committer | 2025-11-07 17:43:27 +0100 | |
| commit | e8310e8ec900e91366af44791030e6ffc9d414fe (patch) | |
| tree | b9a236317f53ea6a4089b25827b1d31825fbce2b /c | |
| parent | e1abae83ba4f03e62df5b76afea7441d27b57071 (diff) | |
c: inc/dec ptr should use ptrdiff integer class
Diffstat (limited to 'c')
| -rw-r--r-- | c/c.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3255,7 +3255,7 @@ compileexpr(struct function *fn, const struct expr *ex, bool discard) r = expraddr(fn, sub); ins.l = genload(fn, sub->ty, r, sub->qual & QVOLATILE); if (ex->ty.t == TYPTR) - ins.r = mkintcon(KI4, typesize(typechild(ex->ty))); + ins.r = mkintcon(type2cls[targ_sizetype], typesize(typechild(ex->ty))); else ins.r = mkref(RICON, 1); genstore(fn, sub->ty, r, irbinop(fn, ins.op, ins.cls, ins.l, ins.r)); @@ -3267,7 +3267,7 @@ compileexpr(struct function *fn, const struct expr *ex, bool discard) r = expraddr(fn, sub); ins.l = genload(fn, sub->ty, r, sub->qual & QVOLATILE); if (ex->ty.t == TYPTR) - ins.r = mkintcon(KI4, typesize(typechild(ex->ty))); + ins.r = mkintcon(type2cls[targ_sizetype], typesize(typechild(ex->ty))); else ins.r = mkref(RICON, 1); q = irbinop(fn, ins.op, ins.cls, ins.l, ins.r); |