3 ms·
C doesn't require convertibility to an integer and recognizes that pointers may have atypical representations. Casting to integer types has always been implemen
by kevin_thibedeau 11mo ago
C doesn't require convertibility to an integer and recognizes that pointers may have atypical representations. Casting to integer types has always been implementation defined. [u]intptr_t is optional specifically to allow such platforms to claim standard conformance.
- torginus 11mo agoI know, but from what you wrote, Rust kinda assumes pointers are ints (because they are the same type as array indices) So as to not only hate on Rust, I want to remark, that baking in the idea that pointers can be used for arithmetic isn't a good one as well.