[Image-SIG] rehash_collide, strict aliasing, and pointer sizes

Brian Crowell brian at fluggo.com
Sun Oct 14 06:03:28 CEST 2012


On Sat, Oct 13, 2012 at 10:56 PM, Brian Crowell <brian at fluggo.com> wrote:
>     union {
>         void *ptr;
>         int val;
>     } uresult, uvalp = { *valp }, unewval = { newval };

...and just after I send that, it occurs to me that the code could
just be trying to store an int in the space reserved for a void
pointer. In that case, I'll go with this:

    *valp = (void *)(((int) *valp) + ((int) newval));

...and later see if that produces warnings on a 64-bit machine.

--Brian


More information about the Image-SIG mailing list