News for hackers. Stuff that matters.
Re:Tree traversal without recursion: the tree as a state mac... by Asooka on Tuesday September 03, 2019 @04:52AM (#20864756)
Not UB in the slightest. You can take a pointer, cast it to uintptr_t, do whatever you want to that int, then cast it back to a pointer. It's only UB if the resulting pointer isn't valid or you cast it to the wrong type (and strict aliasing is enabled.
Re:Tree traversal without recursion: the tree as a state mac... by rocqua on Wednesday September 04, 2019 @03:46PM (#20880736)
Hm, good to know.