public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] Placate -Wmissing-declarations in sim/cris
@ 2023-08-19 18:28 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-08-19 18:28 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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.
---
 sim/cris/cris-tmpl.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sim/cris/cris-tmpl.c b/sim/cris/cris-tmpl.c
index d1fe90641b1..b39583cdb20 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
 }
 \f
+/* 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
-- 
2.41.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-20  0:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-19 18:28 [pushed] Placate -Wmissing-declarations in sim/cris Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).