Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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: