From ede5f15146ae45f4c017f5701629a4fa04ef2beb Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 30 Sep 2015 11:21:52 -0400 Subject: gdbarch.h: Change gdbarch_info::tdep_info's type to void * As reported by Ulrich here: https://sourceware.org/ml/gdb-patches/2015-09/msg00604.html 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 *. gdb/ChangeLog: * 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. --- gdb/i386-tdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/i386-tdep.c') diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 2ac2f15..92f60fd 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -8478,7 +8478,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_insn_is_jump (gdbarch, i386_insn_is_jump); /* Hook in ABI-specific overrides, if they have been registered. */ - info.tdep_info = (struct gdbarch_tdep_info *) tdesc_data; + info.tdep_info = tdesc_data; gdbarch_init_osabi (info, gdbarch); if (!i386_validate_tdesc_p (tdep, tdesc_data)) -- cgit v1.1