Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
yoklov
on June 1, 2016
|
parent
|
context
|
favorite
| on:
You Can't Always Hash Pointers in C
I thought it was UB to use < on pointers outside of the same block of memory. e.g. your function is fine if the answer is true, but UB if the answer is false.
I could be misremembering though, but I do know I'd always cast to uintptr_t for this.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
I could be misremembering though, but I do know I'd always cast to uintptr_t for this.