David Glasser wrote:
> <snip>
>
> Also, I'm not really sure that casting unsigned int<->void* is
> technically well-defined.
Hi all,
Excuse me for barging in like this but as I've got some
cross compiler development background I feel like I could
give you a small nugget of information here.
The cast is well defined but may not work on 64-bit
architectures that define int as a 32 bit type (or any arch
where a (default) pointer is larger than an int). You should
consider using uintptr_t (or intptr_t), which is defined in
<stddef.h>, whenever you need to do freaky stuff with pointers.
Or simply cast to a char * (assuming, of course, that a char
is 8 bits...).
Regards
/Daniel Widenfalk
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2406952
Received on 2009-10-14 02:56:33 CEST