>>41Unix programmers have been stashing pointers in longs and the like since (approximately) the beginning of time. POSIX provides cover for many historic practices like this one (use of void * to store function pointers is another example). C99 is too recent.
>>43It may well be defined but the conversion is still destructive.
I will confess I forgot about intptr_t entirely. I believe this particular code could get away with using an intptr_t or if the the range of values to be stored will fit in an intptr_t.