2011-06-18 Paul Eggert <eggert@cs.ucla.edu>
+ * lisp.h (lint_assume): New macro.
+ * composite.c (composition_gstring_put_cache):
+ * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
+
* editfns.c: Omit unnecessary forward decls, to simplify future changes.
* ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
len = j;
}
+ lint_assume (len <= TYPE_MAXIMUM (EMACS_INT) - 2);
copy = Fmake_vector (make_number (len + 2), Qnil);
LGSTRING_SET_HEADER (copy, Fcopy_sequence (header));
for (i = 0; i < len; i++)
if (CHAR_VARIATION_SELECTOR_P (c))
with_variation_selector++;
}
+
len = i;
+ lint_assume (len <= TYPE_MAXIMUM (EMACS_INT) - 2);
+
if (with_variation_selector)
{
setup_otf_gstring (len);
? 0 \
: (wrong_type_argument (Qlistp, (list))), 1))
-/* Use this to suppress gcc's `...may be used before initialized' warnings. */
+/* Use this to suppress gcc's warnings. */
#ifdef lint
+
+/* Use CODE only if lint checking is in effect. */
# define IF_LINT(Code) Code
+
+/* Assume that the expression COND is true. This differs in intent
+ from 'assert', as it is a message from the programmer to the compiler. */
+# define lint_assume(cond) ((cond) ? (void) 0 : abort ())
+
#else
# define IF_LINT(Code) /* empty */
+# define lint_assume(cond) ((void) (0 && (cond)))
#endif
/* The ubiquitous min and max macros. */