This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH c++ 1/6] rs6000: Add cast for int to enum conversion
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Wed, 21 Oct 2015 14:45:55 -0400
- Subject: Re: [PATCH c++ 1/6] rs6000: Add cast for int to enum conversion
- Authentication-results: sourceware.org; auth=none
- References: <1444624329-4828-1-git-send-email-simon dot marchi at polymtl dot ca>
On 15-10-12 12:32 AM, Simon Marchi wrote:
> Fixes this error:
>
> /home/pedro/gdb/mygit/src/gdb/rs6000-tdep.c:3091:1: error: invalid conversion from âintâ to âbfd_architectureâ [-fpermissive]
> };
> ^
> /home/pedro/gdb/mygit/src/gdb/rs6000-tdep.c: In function âvoid powerpc_set_vector_abi(char*, int, cmd_list_element*)â:
> /home/pedro/gdb/mygit/src/gdb/rs6000-tdep.c:6063:28: error: invalid conversion from âintâ to âpowerpc_vector_abiâ [-fpermissive]
> powerpc_vector_abi_global = vector_abi;
> ^
>
> gdb/ChangeLog:
>
> * rs6000-tdep.c (variants): Add (enum bfd_architecture) cast.
> ---
> gdb/rs6000-tdep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
> index baf6b67..589b996 100644
> --- a/gdb/rs6000-tdep.c
> +++ b/gdb/rs6000-tdep.c
> @@ -3144,7 +3144,7 @@ static struct variant variants[] =
> {"rs2", "IBM POWER RS2", bfd_arch_rs6000,
> bfd_mach_rs6k_rs2, &tdesc_rs6000},
>
> - {0, 0, 0, 0, 0}
> + {0, 0, (enum bfd_architecture) 0, 0, 0}
> };
>
> /* Return the variant corresponding to architecture ARCH and machine number
>
Ping for patches 1, 2 and 3.