From: Alexandre Oliva Date: Mon, 26 Nov 2007 06:37:46 +0000 (+0000) Subject: * tree.c (type_hash_add): Don't violate strict aliasing rules. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0043f60679c6c6b8b76acb75cf8a7e363aca1d06;p=gcc.git * tree.c (type_hash_add): Don't violate strict aliasing rules. From-SVN: r130429 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e500186c6c5..83a3ee87289 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2007-11-26 Alexandre Oliva + + * tree.c (type_hash_add): Don't violate strict aliasing rules. + 2007-11-26 Alexandre Oliva PR c/27898 diff --git a/gcc/tree.c b/gcc/tree.c index 9c6547480b7..6cb76f05507 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -4677,7 +4677,7 @@ type_hash_add (hashval_t hashcode, tree type) h->hash = hashcode; h->type = type; loc = htab_find_slot_with_hash (type_hash_table, h, hashcode, INSERT); - *(struct type_hash **) loc = h; + *loc = (void*)h; } /* Given TYPE, and HASHCODE its hash code, return the canonical