This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed/vms]: Avoid a compiler warning


Hi,

I am committing the patch proposed by Andreas on gdb@ in order to avoid a compiler warning.

Tristan.

bfd/
2010-04-16  Andreas Schwab  <schwab@redhat.com>

	* vms-alpha.c (alpha_vms_link_add_object_symbols): Avoid breaking
	strict-aliasing rules.
*** vms-alpha.c	16 Apr 2010 14:23:41 -0000	1.2
--- vms-alpha.c	16 Apr 2010 14:36:43 -0000
***************
*** 7966,7971 ****
--- 7966,7972 ----
      {
        struct vms_symbol_entry *e = PRIV (syms)[i];
        struct alpha_vms_link_hash_entry *h;
+       struct bfd_link_hash_entry *h_root;
        asymbol sym;
  
        if (!alpha_vms_convert_symbol (abfd, e, &sym))
***************
*** 7983,7992 ****
        else
          h = NULL;
  
        if (_bfd_generic_link_add_one_symbol
            (info, abfd, sym.name, sym.flags, sym.section, sym.value,
!            NULL, FALSE, FALSE, (struct bfd_link_hash_entry **)&h) == FALSE)
          return FALSE;
  
        if ((e->flags & EGSY__V_DEF)
            && h->sym == NULL
--- 7984,7995 ----
        else
          h = NULL;
  
+       h_root = (struct bfd_link_hash_entry *) h;
        if (_bfd_generic_link_add_one_symbol
            (info, abfd, sym.name, sym.flags, sym.section, sym.value,
!            NULL, FALSE, FALSE, &h_root) == FALSE)
          return FALSE;
+       h = (struct alpha_vms_link_hash_entry *) h_root;
  
        if ((e->flags & EGSY__V_DEF)
            && h->sym == NULL


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]