Hi! Ken Raeburn <raeb...@raeburn.org> writes:
> On Sep 2, 2009, at 04:08, Ludovic Courtès wrote: >>> In the Guile case, I'm a tiny bit concerned about some of the >>> pointer/ >>> int games played (e.g., I'm pretty sure C99 does not guarantee that >>> you can convert an arbitrary uintptr_t value to pointer and back and >>> be guaranteed of getting the original value... but I don't know of a >>> platform that actually violates that assumption), but only a tiny >>> bit. >> >> Really? I think the whole purpose of `uintptr_t' is to allow that, >> isn't it? > > It's the other way around that's guaranteed to work: void* -> > (u)intptr_t -> void*. So any value originally derived from a valid > pointer will work, but arbitrary values may not. [...] Hmm, I see. Thanks for the interesting explanation! Now I understand that I've been lucky enough to live in a beautiful world with power-of-two pointer types, NULL == 0, etc. ;-) Thanks, Ludo'.