Ulrich Weigand wrote: > 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). > Indeed it does fix it here too. Much nicer. Thanks for the pointer. Testsuite shows the same results as the previous version. OK now? -- Cheers, Pedro Alves