@johnregehr @ch3root @spun_off They're all incorrect. ~7u is well-defined truncated to width of unsigned. ~7 assumes 2s complement.
@RichFelker @johnregehr @ch3root @spun_off I'm not sure what you mean then. Isn't that a prereq. for ptr -> uintptr_t math -> ptr?
-
-
@BRIAN_____@johnregehr@ch3root @spun_off No. Without that you can still do all sorts of math treating the values as opaque. -
@BRIAN_____@johnregehr@ch3root @spun_off Hashing or encryption of ptrs, xor linked lists, 'base-relative' diffs for ptrs in shm, etc. -
@RichFelker@johnregehr@ch3root @spun_off The standard says only that given a uintptr_t converted from pointer, you can recover pointer. -
@BRIAN_____@johnregehr@RichFelker @spun_off Right. That's why I like one conv (ptr->uint) more than two (ptr->uint & uint->ptr). -
@BRIAN_____@johnregehr@RichFelker @spun_off The difference is not that big given ptr->uint conv is impl-def anyway. -
@BRIAN_____@johnregehr@RichFelker @spun_off But mappings are "intended to be consistent with the addressing structure of the exec. env.". -
@ch3root@johnregehr@RichFelker @spun_off Thank you for this. I appreciate the quote and I learned something from this.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.