Attempt to remove 'warning: dereferencing type-punned pointer will break strict-aliasing rules'

This commit is contained in:
Jay McCarthy 2010-05-18 09:01:04 -05:00
parent 43d1494aef
commit 741f5502f3

View File

@ -164,7 +164,8 @@ ptr_t GC_build_fl(struct hblk *h, size_t sz, GC_bool clear, ptr_t list)
* put p (which is now head of list of objects in *h) as first
* pointer in the appropriate free list for this size.
*/
obj_link(h -> hb_body) = list;
word *tmp = (word *)h->hb_body;
obj_link(tmp) = list;
return ((ptr_t)p);
}