Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: Multi-gdb build failure
       [not found] <27531.5651590519$1271404881@news.gmane.org>
@ 2010-04-16  8:49 ` Andreas Schwab
  2010-04-16 14:32   ` Tristan Gingold
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2010-04-16  8:49 UTC (permalink / raw)
  To: Pierre Muller; +Cc: gdb

"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

Andreas.

-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Multi-gdb build failure
  2010-04-16  8:49 ` Multi-gdb build failure Andreas Schwab
@ 2010-04-16 14:32   ` Tristan Gingold
  0 siblings, 0 replies; 3+ messages in thread
From: Tristan Gingold @ 2010-04-16 14:32 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Pierre Muller, gdb


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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Multi-gdb build failure
@ 2010-04-16  8:01 Pierre Muller
  0 siblings, 0 replies; 3+ messages in thread
From: Pierre Muller @ 2010-04-16  8:01 UTC (permalink / raw)
  To: gdb

  My knowledge of C is again too low,
I have no idea what this warning means,
other than I could not check my last commit 
with multi 64 bit gdb because of it.

I was trying to compile gdb on cygwin with
--enable-targets=all --enable-64-bit-bfd

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/bfd -I.
-I../../src/bfd -
I../../src/bfd/../include -DBINDIR=\"/usr/local/bin\" -W -Wall
-Wstrict-prototyp
es -Wmissing-prototypes -Werror -g -O2 -MT vms-alpha.lo -MD -MP -MF
.deps/vms-al
pha.Tpo -c ../../src/bfd/vms-alpha.c -o vms-alpha.o
../../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?

Pierre


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-16 14:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <27531.5651590519$1271404881@news.gmane.org>
2010-04-16  8:49 ` Multi-gdb build failure Andreas Schwab
2010-04-16 14:32   ` Tristan Gingold
2010-04-16  8:01 Pierre Muller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox