Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tristan Gingold <gingold@adacore.com>
To: Andreas Schwab <schwab@redhat.com>
Cc: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>,
	  <gdb@sourceware.org>
Subject: Re: Multi-gdb build failure
Date: Fri, 16 Apr 2010 14:32:00 -0000	[thread overview]
Message-ID: <FEEAC286-40B4-4829-BDF7-666C276E03B4@adacore.com> (raw)
In-Reply-To: <m38w8nok8r.fsf@hase.home>


On Apr 16, 2010, at 10:49 AM, Andreas Schwab wrote:

> "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr> writes:
> 
>> ../../src/bfd/vms-alpha.c: In function `alpha_vms_link_add_object_symbols':
>> ../../src/bfd/vms-alpha.c:7997: warning: dereferencing type-punned pointer
>> will
>> break strict-aliasing rules
>> make[3]: *** [vms-alpha.lo] Error 1
>> 
>>  Is there a fix to this?
> 
> --- vms-alpha.c.~1.1.~	2010-04-14 11:24:59.000000000 +0200
> +++ vms-alpha.c	2010-04-16 10:46:19.000000000 +0200
> @@ -7975,6 +7975,7 @@ alpha_vms_link_add_object_symbols (bfd *
>     {
>       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))
> @@ -7992,10 +7993,12 @@ alpha_vms_link_add_object_symbols (bfd *
>       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, (struct bfd_link_hash_entry **)&h) == FALSE)
> +           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

That's look fine.  I will commit that now.

Thank you for catching that,
Tristan.


  reply	other threads:[~2010-04-16 14:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <27531.5651590519$1271404881@news.gmane.org>
2010-04-16  8:49 ` Andreas Schwab
2010-04-16 14:32   ` Tristan Gingold [this message]
2010-04-16  8:01 Pierre Muller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FEEAC286-40B4-4829-BDF7-666C276E03B4@adacore.com \
    --to=gingold@adacore.com \
    --cc=gdb@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    --cc=schwab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox