Closed andy-hanson closed 1 month ago
Update: It's not the sizeof
that's the problem, but the type of the divisor. It breaks the same if you replace sizeof(char)
with 1uLL
.
Thank you for reporting this issue which is actually a bug in code selection pass. I've fixed it on master by b79c0ee2e919bea54ac0f877b5aba5a6cf68b69e.
Thanks, I confirmed it's working now.
Running
c2m a.c -eg
, I get:I've done my best to reduce this error, but it seems to depend on a pretty specific scenario.
unsigned
instead ofunsigned long
for the size.convert
(which isn't used) or remove either member ofstring2
(also unused)./ sizeof(char)
or replace it with/ 1
.