# New Ticket Created by NotFound
# Please include the string: [perl #53990]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=53990 >
Hello.
In recent revisions there are warning about unused static functions in
compilers/imcc/optimizer.c
The problem is that the definitions of _is_ins_save and is_ins_save
are if'ed out by DO_LOOP_OPTIMIZATION but his declarations are not.
This patch fixes the issue.
--
Salu2
Index: compilers/imcc/optimizer.c
===================================================================
--- compilers/imcc/optimizer.c (revisión: 27443)
+++ compilers/imcc/optimizer.c (copia de trabajo)
@@ -82,6 +82,8 @@
/* HEADERIZER BEGIN: static */
+#if DO_LOOP_OPTIMIZATION
+
PARROT_WARN_UNUSED_RESULT
static int _is_ins_save(
ARGIN(const IMC_Unit *unit),
@@ -92,6 +94,8 @@
__attribute__nonnull__(2)
__attribute__nonnull__(3);
+#endif
+
static int branch_branch(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
@@ -148,6 +152,8 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*unit);
+#if DO_LOOP_OPTIMIZATION
+
PARROT_WARN_UNUSED_RESULT
static int is_ins_save(PARROT_INTERP,
ARGIN(const IMC_Unit *unit),
@@ -159,6 +165,8 @@
__attribute__nonnull__(3)
__attribute__nonnull__(4);
+#endif
+
static int strength_reduce(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
__attribute__nonnull__(1)
__attribute__nonnull__(2)