Changeset: ecc649bdc137 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ecc649bdc137 Modified Files: gdk/gdk_search.h Branch: default Log Message:
Backout changeset 9470908160c7: dereferencing type-punned pointer will break strict-aliasing rules. diffs (22 lines): diff --git a/gdk/gdk_search.h b/gdk/gdk_search.h --- a/gdk/gdk_search.h +++ b/gdk/gdk_search.h @@ -89,14 +89,14 @@ gdk_export BUN HASHlist(Hash *h, BUN i); /* XXX return size_t-sized value for 8-byte oid? */ #define hash_lng(H,V) ((BUN) mix_int((unsigned int) (*(const lng *)(V) ^ (*(lng *)(V) >> 32))) & (H)->mask) #if SIZEOF_OID == SIZEOF_INT -#define hash_oid(H,V) hash_int(H,V) +#define hash_oid(H,V) ((BUN) mix_int((unsigned int) *((const oid*) (V))) & (H)->mask) #else -#define hash_oid(H,V) hash_lng(H,V) +#define hash_oid(H,V) ((BUN) mix_int((unsigned int) (*(const oid *)(V) ^ (*(const oid *)(V) >> 32))) & (H)->mask) #endif #if SIZEOF_WRD == SIZEOF_INT -#define hash_wrd(H,V) hash_int(H,V) +#define hash_wrd(H,V) ((BUN) mix_int((unsigned int) *((const wrd*) (V))) & (H)->mask) #else -#define hash_wrd(H,V) hash_lng(H,V) +#define hash_wrd(H,V) ((BUN) mix_int((unsigned int) (*(const wrd *)(V) ^ (*(const wrd *)(V) >> 32))) & (H)->mask) #endif #define hash_flt(H,V) hash_int(H,V) _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
