aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-08-19 12:26:21 -0600
committerTom Tromey <tom@tromey.com>2023-08-19 12:26:21 -0600
commit887f85fb624496a4c34000828418fc865a2a5fe8 (patch)
tree23756553d1b7f0d1cb2fb6142597598a98464147 /sim
parentf03d5c972e1b74c53c601f18a6ec5962879336cc (diff)
downloadfsf-binutils-gdb-887f85fb624496a4c34000828418fc865a2a5fe8.zip
fsf-binutils-gdb-887f85fb624496a4c34000828418fc865a2a5fe8.tar.gz
fsf-binutils-gdb-887f85fb624496a4c34000828418fc865a2a5fe8.tar.bz2
Placate -Wmissing-declarations in sim/cris
I get a couple of -Wmissing-declarations errors when building the sim. This happens because an earlier patch added the declarations to a cgen-generated header, but the recent re-generation then removed them. This patch fixes the build by adding declarations just before the definition. This is normally not best practice, but in this particular situation it at leat un-breaks the build.
Diffstat (limited to 'sim')
-rw-r--r--sim/cris/cris-tmpl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sim/cris/cris-tmpl.c b/sim/cris/cris-tmpl.c
index d1fe906..b39583c 100644
--- a/sim/cris/cris-tmpl.c
+++ b/sim/cris/cris-tmpl.c
@@ -261,6 +261,9 @@ MY (make_thread_cpu_data) (SIM_CPU *current_cpu, void *context)
return info;
}
+/* Placate -Wmissing-prototypes when mloop.in isn't used. */
+void MY (f_specific_init) (SIM_CPU *current_cpu);
+
/* Hook function for per-cpu simulator initialization. */
void
@@ -276,6 +279,13 @@ MY (f_specific_init) (SIM_CPU *current_cpu)
#endif
}
+/* Placate -Wmissing-prototypes when mloop.in isn't used. */
+int MY (XCONCAT3 (f_model_crisv,BASENUM, _u_stall))
+ (SIM_CPU *current_cpu ATTRIBUTE_UNUSED,
+ const IDESC *idesc,
+ int unit_num,
+ int referenced ATTRIBUTE_UNUSED);
+
/* Model function for arbitrary single stall cycles. */
int