Conversation

Posts I'm finding warn that intptr_t and uintptr_t are not guaranteed by the standard to exist. What would be an example of a platform that don't have intptr_t/uintptr_t? Will a platform that doesn't define intptr_t define/not define something so I can detect this? INTPTR_MIN?
4
11
Okay I feel like I'm losing my mind here. Per my strict reading of the C99 standard, uintptr_t is not required to be defined, but UINTPTR_MAX *is* required to be defined and gte 2^16-1, even though the type it describes might not exist
Image
Image
Image
4
27
Replying to and
The way Java supports unsigned integers is that the types like int are for both signed and unsigned numbers. The +, - and * operators work for either signed or unsigned arithmetic. There are compareUnsigned, divideUnsigned, etc. for operations that are different. It's horrible.
1
2
Not sure how Java qualifies as a high level language. The one that always gets me is needing to use equals instead of == to compare objects, especially for strings. Many types forgot to override equals including arrays so you have Arrays.equals... but that uses equals in a loop.
2