From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: pedro_alves@portugalmail.pt (Pedro Alves)
Cc: gdb-patches@sourceware.org
Subject: Re: Avoid gcc warning on sparc solaris 9
Date: Tue, 23 Oct 2007 17:56:00 -0000 [thread overview]
Message-ID: <200710231710.l9NHAUtT006558@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <4053daab0710230924o386935aer31a1a2fb4f70da31@mail.gmail.com> from "Pedro Alves" at Oct 23, 2007 05:24:11 PM
Pedro Alves wrote:
> Building HEAD on a native gdb on sparc solaris 9 with gcc 3.4.6 stops due to:
>
> ../../src/gdb/sol-thread.c: In function `sol_thread_fetch_registers':
> ../../src/gdb/sol-thread.c:533: warning: dereferencing type-punned
> pointer will break strict-aliasing rules
We've seen this on other platforms with gcc 3.4 as well. I think
the best fix would be replace the problematic construct
supply_gregset (regcache, (const gdb_gregset_t *) &gregset);
with
gdb_gregset_t *gregset_p = &gregset;
supply_gregset (regcache, (const gdb_gregset_t *) gregset_p);
That seemed to fix the problems e.g. in i386-linux-nat.c (fetch_regs).
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2007-10-23 17:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 16:46 Pedro Alves
2007-10-23 17:56 ` Ulrich Weigand [this message]
2007-10-24 13:28 ` Pedro Alves
2007-10-24 13:45 ` Ulrich Weigand
2007-10-24 13:48 ` Daniel Jacobowitz
2007-10-24 13:58 ` Pedro Alves
2007-10-24 14:56 ` Daniel Jacobowitz
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=200710231710.l9NHAUtT006558@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro_alves@portugalmail.pt \
/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