]> code.delx.au - gnu-emacs/blobdiff - src/ccl.c
* editfns.c (Fdelete_region): Clarify the use of the named parameters.
[gnu-emacs] / src / ccl.c
index e2ef4f194f30b5697b5a6f153ea558261bb8fea7..9cfcbfe870382dfa590fcb4719a4c8b4856fc05a 100644 (file)
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -745,11 +745,15 @@ while(0)
 
 #endif
 
+/* Use "&" rather than "&&" to suppress a bogus GCC warning; see
+   <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43772>.  */
+#define ASCENDING_ORDER(lo, med, hi) (((lo) <= (med)) & ((med) <= (hi)))
+
 #define GET_CCL_RANGE(var, ccl_prog, ic, lo, hi)               \
   do                                                           \
     {                                                          \
       EMACS_INT prog_word = XINT ((ccl_prog)[ic]);             \
-      if (! ((lo) <= prog_word && prog_word <= (hi)))          \
+      if (! ASCENDING_ORDER (lo, prog_word, hi))               \
        CCL_INVALID_CMD;                                        \
       (var) = prog_word;                                       \
     }                                                          \
@@ -761,7 +765,7 @@ while(0)
 #define GET_CCL_INT(var, ccl_prog, ic)                         \
   GET_CCL_RANGE (var, ccl_prog, ic, INT_MIN, INT_MAX)
 
-#define IN_INT_RANGE(val) (INT_MIN <= (val) && (val) <= INT_MAX)
+#define IN_INT_RANGE(val) ASCENDING_ORDER (INT_MIN, val, INT_MAX)
 
 /* Encode one character CH to multibyte form and write to the current
    output buffer.  If CH is less than 256, CH is written as is.  */
@@ -2301,23 +2305,12 @@ syms_of_ccl (void)
   staticpro (&Vccl_program_table);
   Vccl_program_table = Fmake_vector (make_number (32), Qnil);
 
-  Qccl = intern_c_string ("ccl");
-  staticpro (&Qccl);
-
-  Qcclp = intern_c_string ("cclp");
-  staticpro (&Qcclp);
-
-  Qccl_program = intern_c_string ("ccl-program");
-  staticpro (&Qccl_program);
-
-  Qccl_program_idx = intern_c_string ("ccl-program-idx");
-  staticpro (&Qccl_program_idx);
-
-  Qcode_conversion_map = intern_c_string ("code-conversion-map");
-  staticpro (&Qcode_conversion_map);
-
-  Qcode_conversion_map_id = intern_c_string ("code-conversion-map-id");
-  staticpro (&Qcode_conversion_map_id);
+  DEFSYM (Qccl, "ccl");
+  DEFSYM (Qcclp, "cclp");
+  DEFSYM (Qccl_program, "ccl-program");
+  DEFSYM (Qccl_program_idx, "ccl-program-idx");
+  DEFSYM (Qcode_conversion_map, "code-conversion-map");
+  DEFSYM (Qcode_conversion_map_id, "code-conversion-map-id");
 
   DEFVAR_LISP ("code-conversion-map-vector", Vcode_conversion_map_vector,
               doc: /* Vector of code conversion maps.  */);