PATCH: Work around another gcc 3.4 alias warning bug

H.J. Lu hjl@lucon.org
Mon Jul 16 18:22:00 GMT 2007


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 = ®s;
 
   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



More information about the Gdb-patches mailing list