3 ms·
The signedness of `char` is implementation-defined, it is signed on x86 but unsigned on ARM. So assigning a plain char to a wider integer type is suspicious, di
by pdw 11mo ago
The signedness of `char` is implementation-defined, it is signed on x86 but unsigned on ARM. So assigning a plain char to a wider integer type is suspicious, did the programmer expect sign-extension or zero-extension?
- astrange 11mo agoIt's not implementation-defined in Java because there aren't any unsigned types. Personally I think explicit typecasts are even more suspicious, because introducing explicit semantics is worse than implicit semantics if the explicit ones are wrong.