+2017-06-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ diffseq: port to GCC 7 with --enable-gcc-warnings
+ * lib/diffseq.h (diag): Use an if, not an ifdef, for most of the
+ heuristic check. This way, GCC 7 with --enable-gcc-warnings does
+ not complain about big_snake being defined but not used.
+
2017-06-15 Bruno Haible <bruno@clisp.org>
gettext-h: Update theoretical condition for use of variable size arrays.
continue;
#ifdef USE_HEURISTIC
+ bool heuristic = ctxt->heuristic;
+#else
+ bool heuristic = false;
+#endif
+
/* Heuristic: check occasionally for a diagonal that has made lots
of progress compared with the edit distance. If we have any
such, find the one that has made the most progress and return it
With this heuristic, for vectors with a constant small density
of changes, the algorithm is linear in the vector size. */
- if (200 < c && big_snake && ctxt->heuristic)
+ if (200 < c && big_snake && heuristic)
{
{
OFFSET best = 0;
}
}
}
-#endif /* USE_HEURISTIC */
/* Heuristic: if we've gone well beyond the call of duty, give up
and report halfway between our best results so far. */