This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
While compiling binutils-2.17, i get the error "dereferencing type-punned pointer will break strict-aliasing rules"
- From: Mayank Kumar <mayank at microsoft dot com>
- To: "binutils at sources dot redhat dot com" <binutils at sources dot redhat dot com>
- Date: Fri, 8 Jun 2007 00:52:34 +0800
- Subject: While compiling binutils-2.17, i get the error "dereferencing type-punned pointer will break strict-aliasing rules"
- Accept-language: en-US
- Acceptlanguage: en-US
if (! (bfd_coff_link_add_one_symbol
(info, dynobj,
&LOADER_SYM[bfd_get_symbol_leading_char(dynobj)=='_'?0:1],
BSF_GLOBAL, s,
(bfd_vma) 0, (const char *) NULL,
FALSE, FALSE,
(struct bfd_link_hash_entry **) &h)))------------------------>The error points to this line in all places.
The problem is that variable h is of type struct coff_link_hash_entry *, whereas the function pointer expects a variable of type struct bfd_link_hash_entry *.
Does anybody know how to fix the above error.
Thanks
Mayank