This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

PATCH: Work around another gcc 3.4 alias warning bug


Hi,

Here is a patch to work around another gcc 3.4 alias warning bug
similar to:

http://sourceware.org/ml/gdb-patches/2007-06/msg00395.html

OK to install?

Thanks.


H.J.
----
2007-07-16  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-linux-nat.c (fetch_regs): Work around gcc 3.4 alias
	warning bug.

--- gdb/i386-linux-nat.c.const	2007-06-19 08:44:06.000000000 -0700
+++ gdb/i386-linux-nat.c	2007-07-16 11:02:35.000000000 -0700
@@ -246,6 +246,7 @@ static void
 fetch_regs (struct regcache *regcache, int tid)
 {
   elf_gregset_t regs;
+  elf_gregset_t *regs_p = &regs;
 
   if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)
     {
@@ -260,7 +261,7 @@ fetch_regs (struct regcache *regcache, i
       perror_with_name (_("Couldn't get registers"));
     }
 
-  supply_gregset (regcache, (const elf_gregset_t *) &regs);
+  supply_gregset (regcache, (const elf_gregset_t *) regs_p);
 }
 
 /* Store all valid general-purpose registers in GDB's register array


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