]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* tree.c (type_hash_add): Don't violate strict aliasing rules.
authorAlexandre Oliva <aoliva@redhat.com>
Mon, 26 Nov 2007 06:37:46 +0000 (06:37 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Mon, 26 Nov 2007 06:37:46 +0000 (06:37 +0000)
From-SVN: r130429

gcc/ChangeLog
gcc/tree.c

index e500186c6c5b2dd367c8373bbe63d9b9be59cdb8..83a3ee872896cb073b6ee89eabba0a1715cfc81f 100644 (file)
@@ -1,3 +1,7 @@
+2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
+
+       * tree.c (type_hash_add): Don't violate strict aliasing rules.
+
 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
 
        PR c/27898
index 9c6547480b7f006817a77633b396e8c2e6c0d69b..6cb76f055070d6a7247313f0ac023960a6519704 100644 (file)
@@ -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