This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH]: gas/sim/opcodes Warnings
"Frank Ch. Eigler" wrote:
>
> Hi, Dave -
>
> Changing
>
> > > ! void (*write_function)(SIM_CPU *cpu, UINT, SF),
> to
> > > ! void (*write_function)(),
>
> and
>
> > > ! extern void sim_queue_fn_di_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, DI), UINT, DI);
> to
> > > ! extern void sim_queue_fn_di_write (SIM_CPU *, void (*)(), UINT, DI);
>
> looks weirdly inconsistent. Do none of the other sim_queue_*
> write_functions use the arguments?
Yeah, I know. The problem is that cgen considers DI to be an
integral type and assumes that the signed and unsigned variants
are compatible. However on some platforms, DI is implemented as a
struct and so the signed and unsigned variants are not
compatible. This is what leads to the warnings.
This change does not declare write_function to be a function with
no arguments. In C, this means a function with unspecified
arguments.
Dave