Compiler makes same mistake, the only difference is the warning at compile time, which can be avoided with this casting trick:
return ((unsigned long *)(void *)&ull)[0] ^ ((unsigned long *)(void *)&ull)[1]; /Anders On Tuesday 09 November 2004 16.56, you wrote: > Anders Torger <[EMAIL PROTECTED]> writes: > > unsigned long > > hash(void *key) > > { > > unsigned long long ull; > > ull = *(unsigned long long *)key; > > return ((unsigned long *)&ull)[0] ^ ((unsigned long *)&ull)[1]; > > Try -Wstrict-aliasing. > > Andreas.