Use union of AO_t and 'tse' data pointer in specific.c to avoid type
authorIvan Maidanski <ivmai@mail.ru>
Sun, 29 Jan 2012 16:07:31 +0000 (20:07 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 29 Jan 2012 16:07:31 +0000 (20:07 +0400)
commite07b66f5450830cf8ddeee5f79c7fdc06177e864
tree39c476461c6fd3a18a0f4e062f9d99ec012a375e
parent8a9f0fc4e2684ec2427cac7a555a2692881d370c
Use union of AO_t and 'tse' data pointer in specific.c to avoid type
casting (breaking strict-aliasing rules)

* include/private/specific.h (ptse_ao_u): New union type.
* include/private/specific.h (thread_specific_data): Change type of
"hash" field from "tse" pointer to ptse_ao_u.
* specific.c (invalid_tse): Put to 'const' data section.
* specific.c (GC_key_create_inner, GC_setspecific, GC_remove_specific,
GC_slow_getspecific, GC_check_tsd_marks): Use "p" element of union to
access "tse" pointer of hash table.
* specific.c (GC_setspecific): Use "ao" element of union to store
"hash" table entry atomically; remove type cast.
include/private/specific.h
specific.c