OSDN Git Service

* tree.c (type_hash_add): Don't violate strict aliasing rules.
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 26 Nov 2007 06:37:46 +0000 (06:37 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 26 Nov 2007 06:37:46 +0000 (06:37 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130429 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree.c

index e500186..83a3ee8 100644 (file)
@@ -1,5 +1,9 @@
 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
        * c-typeck.c (tagged_types_tu_compatible_p): Enable exact
        matches between anonymous union fields.
index 9c65474..6cb76f0 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