This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 3/2] Add some more casts (2/2)
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: simon dot marchi at ericsson dot com (Simon Marchi)
- Cc: qiyaoltc at gmail dot com (Yao Qi), gdb-patches at sourceware dot org
- Date: Wed, 30 Sep 2015 17:16:07 +0200 (CEST)
- Subject: Re: [PATCH 3/2] Add some more casts (2/2)
- Authentication-results: sourceware.org; auth=none
Simon Marchi wrote:
> As reported by Ulrich here:
> The system compiler (gcc 4.1) in Centos 5 doesn't like that we cast to a
> pointer to a type that doesn't exist. I see no real value in using this
> kind iof construct over just using void *. So this patch changes the
> tdep_info field to void * and removes the casts. Even in C++, we
> should not need an explicit cast when assigning to a void *.
> * gdbarch.sh (struct gdbarch_info): Change tdep_info's type to void *.
> * gdbarch.h: Regenerate.
> * i386-tdep.c (i386_gdbarch_init): Remove cast to
> struct gdbarch_tdep_info *.
> * mips-tdep.c (mips_gdbarch_init): Likewise.
> * ppc-linux-tdep (ppu2spu_sniffer): Likewise.
> * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
> * spu-multiarch.c (spu_gdbarch): Likewise.
This is OK, thanks!
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain