> | but that won't actually have any effect on systems where
> | int is 32 bits but long is 64.  the problem is that ((p)[3]<<24)
> | is being (correctly) treated as a signed int, and then
> | (vlong)(...|((p)[3]<<24)) sign extends.  Casting the (p)[0]
> | to (ulong) has the effect of making the whole 32-bit expression
> | unsigned on 32-bit systems, but if ulong is 64 bits, then
> | you'll still sign-extend ((p)[3]<<24) during the convertsion
> | from int to ulong.
>
> i'll be wearing the dope sack over my head this week.

this took me forever to puzzle through, by the way.
the only reason i'm pretty sure it's true is that i tried it!  ;-)

russ

Reply via email to