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.
[ Parent
| on HN ]