binutils-gdb/sim/m32c
Mark Wielaard cbbcd7fd10 sim: Fix -Werror=shadow=local by changing mem to addr in sim_{read,write}
m32c/cpu.h defines mem as enum value, which causes GCC 14 to emit

sim/m32c/gdb-if.c: In function ‘sim_read’:
sim/m32c/gdb-if.c:162:33: error: declaration of ‘mem’ shadows a previous local [-Werror=shadow=local]
  162 | sim_read (SIM_DESC sd, uint64_t mem, void *buf, uint64_t length)
      |                        ~~~~~~~~~^~~
In file included from ../../binutils-gdb/sim/m32c/gdb-if.c:38:
sim/m32c/cpu.h:83:3: note: shadowed declaration is here
   83 |   mem,
      |   ^~~

Fix this by renaming mem to addr in all sim_read and sim_write functions.
Most already used addr instead of mem. In one file, sim/rx/gdb-if.c, this
also meant renaming the local addr variable to vma.
2024-01-22 14:22:30 +01:00
..
ChangeLog-2021 sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
cpu.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
gdb-if.c sim: Fix -Werror=shadow=local by changing mem to addr in sim_{read,write} 2024-01-22 14:22:30 +01:00
int.c Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
int.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
load.c Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
load.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
local.mk Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
m32c.opc Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
main.c Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
mem.c Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
mem.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
misc.c Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
misc.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
opc2c.c Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
r8c.opc Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
reg.c Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
srcdest.c Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
syscalls.c Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
syscalls.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
timer_a.h sim: m32c: enable warnings & clean up a bunch 2015-04-01 02:22:58 -04:00
trace.c Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00
trace.h Update copyright year range in header of all files managed by GDB 2024-01-12 15:49:57 +00:00