3 ms·
That's not readily readable on a cellphone, unfortunately - this is: > This is not guaranteed to work. C guarantees that casting a pointer to a uintptr_t and
by e12e 10y ago
That's not readily readable on a cellphone, unfortunately - this is:
> This is not guaranteed to work. C guarantees that casting a pointer to a uintptr_t and back results in a pointer which compares equal to the original; but it does not guarantee that (uintptr_t)p + 1 == (uintptr_t)((char * )p + 1), that p1 < p2 is equivalent to (uintptr_t)(p1) < (uintptr_t)(p2), or even that (uintptr_t)(p) == (uintptr_t)(p); an evil but standard-compliant compiler could implement casting from pointer to uintptr_t as "stash the pointer in a table and return the table index" and casting back as "look up the index in the table".