diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-24 03:39:52 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2024-01-22 20:12:08 -0500 |
commit | 8fed036befd8e87e9a602a5fc926db30aad69af3 (patch) | |
tree | 954028e548c8143b814a29e918dc472b85597688 /sim/frv/local.mk | |
parent | 48a121f83cae0a625f63d3ad5f8a9149f7fa964a (diff) | |
download | gdb-8fed036befd8e87e9a602a5fc926db30aad69af3.zip gdb-8fed036befd8e87e9a602a5fc926db30aad69af3.tar.gz gdb-8fed036befd8e87e9a602a5fc926db30aad69af3.tar.bz2 |
sim: frv: fix -Wincompatible-function-pointer-types warnings [PR sim/29752]
Some compilers warn in the frv code:
sem.c:24343:41: error: incompatible function pointer types passing
'void (SIM_CPU *, UINT, UDI)' (aka 'void (struct _sim_cpu *, unsigned int, unsigned long)')
to parameter of type
'void (*)(SIM_CPU *, UINT, DI)' (aka 'void (*)(struct _sim_cpu *, unsigned int, long)') [-Wincompatible-function-pointer-types]
This is due to frvbf_h_acc40U_set using UDI for setting the new value,
but using the common sim_queue_fn_di_write API which uses DI. The same
size, but different sign. We could change frvbf_h_acc40U_set to take a
DI without changing behavior in practice: the UDI is already passed via
the queue function which accepts a DI, and frvbf_h_acc40U_set already
casts the input to UDI before running any operations on it. However,
these files are all generated, so manual changes here would be reverted.
Seems like we can only change the register type for all APIs in the cpu
definition. This builds cleanly, and passes sim unittests. Not sure if
it's 100% the answer, but seems to be the best we have currently.
Bug: https://sourceware.org/PR29752
Diffstat (limited to 'sim/frv/local.mk')
-rw-r--r-- | sim/frv/local.mk | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sim/frv/local.mk b/sim/frv/local.mk index b708ce7..0c34afc 100644 --- a/sim/frv/local.mk +++ b/sim/frv/local.mk @@ -18,9 +18,6 @@ AM_CPPFLAGS_%C% = $(SIM_FRV_TRAPDUMP_FLAGS) -## Some modules don't build cleanly yet. -AM_CFLAGS_%C%_sem.o = -Wno-error - nodist_%C%_libsim_a_SOURCES = \ %D%/modules.c %C%_libsim_a_SOURCES = \ |