mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 04:24:43 +00:00
Fix d10v sim build with GCC 15
The d10v sim fails when built with GCC 15. From the bug:
d10v/table.c:171:17: error: initialization of ‘void (*)(struct sim_state *, SIM_CPU *)’ {aka ‘void (*)(struct sim_state *, struct _sim_cpu *)’} from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
171 | { 0,0,0,0,0,0,0,(void (*)())0,0,{0,0,0}},
| ^
d10v/table.c:171:17: note: (near initialization for ‘Simops[165].func’)
The bug here is that this is the wrong function pointer type. Since
'0' is perfectly fine here, this patch simply removes the cast.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32900
Approved-By: Tom de Vries <tdevries@suse.de>
This commit is contained in:
@@ -150,5 +150,5 @@ write_opcodes (void)
|
||||
printf ("},\n");
|
||||
}
|
||||
}
|
||||
printf ("{ 0,0,0,0,0,0,0,(void (*)())0,0,{0,0,0}},\n};\n");
|
||||
printf ("{ 0,0,0,0,0,0,0,0,0,{0,0,0}},\n};\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user