Skip to content

Commit 887f85f

Browse files
committed
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.
1 parent f03d5c9 commit 887f85f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sim/cris/cris-tmpl.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ MY (make_thread_cpu_data) (SIM_CPU *current_cpu, void *context)
261261
return info;
262262
}
263263

264+
/* Placate -Wmissing-prototypes when mloop.in isn't used. */
265+
void MY (f_specific_init) (SIM_CPU *current_cpu);
266+
264267
/* Hook function for per-cpu simulator initialization. */
265268

266269
void
@@ -276,6 +279,13 @@ MY (f_specific_init) (SIM_CPU *current_cpu)
276279
#endif
277280
}
278281

282+
/* Placate -Wmissing-prototypes when mloop.in isn't used. */
283+
int MY (XCONCAT3 (f_model_crisv,BASENUM, _u_stall))
284+
(SIM_CPU *current_cpu ATTRIBUTE_UNUSED,
285+
const IDESC *idesc,
286+
int unit_num,
287+
int referenced ATTRIBUTE_UNUSED);
288+
279289
/* Model function for arbitrary single stall cycles. */
280290

281291
int

0 commit comments

Comments
 (0)