Open
Description
I had a surprising behavior for my latest patch, where c2c reports an error on linux platform but not on Darwin:
parser/c2_tokenizer.c2:1559:11: error: implicit conversion changes signedness: 'u8' to 'i32'
i32 c = *p++;
^
p
is defined as const u8 *p;
This is a problem for 2 reasons:
- the error is not reported on Darwin, hence there must be something fishy going on that makes the behavior platform dependent where it should not.
- storing an unsigned 8-bit value into a 32-bit signed integer should not be considered an error: the value is preserved, the signedness is irrelevant in this operation and the workaround using a cast is ugly and risky (as all casts).
Metadata
Metadata
Assignees
Labels
No labels