This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [vta/trunk] don't violate strict aliasing rules in type_hash_add
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 15 Dec 2007 19:45:00 -0200
- Subject: Re: [vta/trunk] don't violate strict aliasing rules in type_hash_add
- References: <or4pfrwav6.fsf@oliva.athome.lsd.ic.unicamp.br> <orlk8lh5rg.fsf@oliva.athome.lsd.ic.unicamp.br> <4756AD00.3090402@google.com>
On Dec 5, 2007, Diego Novillo <dnovillo@google.com> wrote:
> On 11/26/07 1:37 AM, Alexandre Oliva wrote:
>> On Nov 12, 2007, Alexandre Oliva <aoliva@redhat.com> wrote:
>>
>>> Ok for the trunk? Installing in vta.
>>
>>> * tree.c (type_hash_add): Don't violate strict aliasing rules.
>>
>>> Index: gcc/tree.c
>>> - *(struct type_hash **) loc = h;
>>> + *loc = (void*)h;
> Space after 'void'.
Thanks, I'm checking this in. Sorry about the delay.
for gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* tree.c (type_hash_add): Fix whitespace.
Index: gcc/tree.c
===================================================================
--- gcc/tree.c (revision 130958)
+++ gcc/tree.c (working copy)
@@ -4677,7 +4677,7 @@
h->hash = hashcode;
h->type = type;
loc = htab_find_slot_with_hash (type_hash_table, h, hashcode, INSERT);
- *loc = (void*)h;
+ *loc = (void *)h;
}
/* Given TYPE, and HASHCODE its hash code, return the canonical
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}