This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH c++ 3/6] xtensa: Fix implicit enum conversions
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>, gdb-patches at sourceware dot org
- Date: Thu, 22 Oct 2015 11:57:56 +0100
- Subject: Re: [PATCH c++ 3/6] xtensa: Fix implicit enum conversions
- Authentication-results: sourceware.org; auth=none
- References: <1444624329-4828-1-git-send-email-simon dot marchi at polymtl dot ca> <1444624329-4828-3-git-send-email-simon dot marchi at polymtl dot ca>
On 10/12/2015 05:32 AM, Simon Marchi wrote:
> XTREG is used with raw numbers, like:
>
> ...
> XTREG( 78,312,32, 4, 4,0x02d7,0x0007,-2, 2,0x1000,excsave7, 0,0,0,0,0,0)
> XTREG( 79,316, 8, 4, 4,0x02e0,0x0007,-2, 2,0x1000,cpenable, 0,0,0,0,0,0)
> XTREG( 80,320,22, 4, 4,0x02e2,0x000b,-2, 2,0x1000,interrupt, 0,0,0,0,0,0)
> XTREG( 81,324,22, 4, 4,0x02e2,0x000d,-2, 2,0x1000,intset, 0,0,0,0,0,0)
> ...
>
> So just add the explicit cast to the macro.
>
> In file included from /home/pedro/gdb/mygit/src/gdb/xtensa-config.c:25:0:
> /home/pedro/gdb/mygit/src/gdb/xtensa-tdep.h:289:2: error: invalid conversion from âintâ to âcall_abi_tâ [-fpermissive]
> }
> ^
>
> gdb/ChangeLog:
>
> * xtensa-tdep.h (XTREG): Add casts.
> (XTREG_END): Likewise.
OK.
Thanks,
Pedro Alves