defaults.h (ASM_OUTPUT_ASCII): Constify a char*.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Mon, 21 Feb 2000 23:27:01 +0000 (23:27 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Mon, 21 Feb 2000 23:27:01 +0000 (23:27 +0000)
* defaults.h (ASM_OUTPUT_ASCII): Constify a char*.

* flow.c (get_common_dest, chain_reorder_blocks, make_reorder_chain,
fixup_reorder_chain, skip_insns_between_block): Add static prototypes.
(life_analysis): Wrap variable `i' with macro ELIMINABLE_REGS.

* haifa-sched.c (rank_for_schedule): Don't cast away const-ness.

* integrate.c (compare_blocks, find_block): Likewise.

* rtl.c (fatal_with_file_and_line): Add ATTRIBUTE_PRINTF_2.

* rtl.h (set_file_and_line_for_stmt): Constify a char*.

* stmt.c (stmt_status, set_file_and_line_for_stmt,
expand_asm_operands): Likewise.

From-SVN: r32094

gcc/ChangeLog
gcc/defaults.h
gcc/flow.c
gcc/haifa-sched.c
gcc/integrate.c
gcc/rtl.c
gcc/rtl.h
gcc/stmt.c

index f6e5897878755d1c8e040cf037caa979f68a6703..8ad693acac64cccc6dc8b001bcb36f8d194b29ad 100644 (file)
@@ -1,3 +1,22 @@
+2000-02-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * defaults.h (ASM_OUTPUT_ASCII): Constify a char*.
+
+       * flow.c (get_common_dest, chain_reorder_blocks, make_reorder_chain,
+       fixup_reorder_chain, skip_insns_between_block): Add static prototypes.
+       (life_analysis): Wrap variable `i' with macro ELIMINABLE_REGS.
+
+       * haifa-sched.c (rank_for_schedule): Don't cast away const-ness.
+
+       * integrate.c (compare_blocks, find_block): Likewise.
+
+       * rtl.c (fatal_with_file_and_line): Add ATTRIBUTE_PRINTF_2.
+
+       * rtl.h (set_file_and_line_for_stmt): Constify a char*.
+
+       * stmt.c (stmt_status, set_file_and_line_for_stmt,
+       expand_asm_operands): Likewise.
+
 Mon Feb 21 17:06:27 2000  Jason Eckhardt  <jle@cygnus.com>
 
        * predict.c (estimate_probability): Added the pointer heuristic to
index 0018bc159174cb5e91857120a1ba7fa65ca983a0..e421e1295a24b11208a2dbf68821e71c0cc8e076 100644 (file)
@@ -66,11 +66,11 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0)
 #define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
   do {                                                                       \
     FILE *_hide_asm_out_file = (MYFILE);                                     \
-    unsigned char *_hide_p = (unsigned char *) (MYSTRING);                   \
+    const unsigned char *_hide_p = (const unsigned char *) (MYSTRING);       \
     int _hide_thissize = (MYLENGTH);                                         \
     {                                                                        \
       FILE *asm_out_file = _hide_asm_out_file;                               \
-      unsigned char *p = _hide_p;                                            \
+      const unsigned char *p = _hide_p;                                              \
       int thissize = _hide_thissize;                                         \
       int i;                                                                 \
       fprintf (asm_out_file, "\t.ascii \"");                                 \
index c1ec515d8babfaf5b17363b42dd2bc9931ff2d06..a7217dbf486ff246e9e5b24b9b4b399311e3d7af 100644 (file)
@@ -351,6 +351,10 @@ static void flow_loop_tree_node_add        PARAMS ((struct loop *, struct loop *));
 static void flow_loops_tree_build      PARAMS ((struct loops *));
 static int flow_loop_level_compute     PARAMS ((struct loop *, int));
 static int flow_loops_level_compute    PARAMS ((struct loops *));
+static basic_block get_common_dest     PARAMS ((basic_block, basic_block));
+static basic_block chain_reorder_blocks        PARAMS ((edge, basic_block));
+static void make_reorder_chain         PARAMS ((basic_block));
+static void fixup_reorder_chain                PARAMS ((void));
 
 /* This function is always defined so it can be called from the
    debugger, and it is declared extern so we don't get warnings about
@@ -2454,8 +2458,8 @@ life_analysis (f, nregs, file, remove_dead_code)
      FILE *file;
      int remove_dead_code;
 {
-  register int i;
 #ifdef ELIMINABLE_REGS
+  register int i;
   static struct {int from, to; } eliminables[] = ELIMINABLE_REGS;
 #endif
   int flags;
@@ -7075,6 +7079,9 @@ static basic_block reorder_last_visited;
 enum reorder_skip_type {REORDER_SKIP_BEFORE, REORDER_SKIP_AFTER,
                        REORDER_SKIP_BLOCK_END};
 
+static rtx skip_insns_between_block    PARAMS ((basic_block,
+                                                enum reorder_skip_type));
+
 /* Skip over insns BEFORE or AFTER BB which are typically associated with
    basic block BB.  */
 
index be7dc48f3a0b841e0360b2aa763c13dfb023769e..939ddab2715e1cc69b9773e1d6fbc7ebe67edb2c 100644 (file)
@@ -3978,8 +3978,8 @@ rank_for_schedule (x, y)
      const PTR x;
      const PTR y;
 {
-  rtx tmp = *(rtx *)y;
-  rtx tmp2 = *(rtx *)x;
+  rtx tmp = *(const rtx *)y;
+  rtx tmp2 = *(const rtx *)x;
   rtx link;
   int tmp_class, tmp2_class, depend_count1, depend_count2;
   int val, priority_val, spec_val, prob_val, weight_val;
index cea4bda787436ce46632f3809e05e79de510b6a9..b3a22a90a166e23e4cefc09ad6b8ab574da9ec88 100644 (file)
@@ -521,8 +521,8 @@ compare_blocks (v1, v2)
      const PTR v1;
      const PTR v2;
 {
-  tree b1 = *((tree *) v1);
-  tree b2 = *((tree *) v2);
+  tree b1 = *((const tree *) v1);
+  tree b2 = *((const tree *) v2);
 
   return ((char *) BLOCK_ABSTRACT_ORIGIN (b1) 
          - (char *) BLOCK_ABSTRACT_ORIGIN (b2));
@@ -536,10 +536,10 @@ find_block (v1, v2)
      const PTR v1;
      const PTR v2;
 {
-  tree b1 = (tree) v1;
-  tree b2 = *((tree *) v2);
+  const union tree_node *b1 = (const union tree_node *) v1;
+  tree b2 = *((const tree *) v2);
 
-  return ((char *) b1 - (char *) BLOCK_ABSTRACT_ORIGIN (b2));
+  return ((const char *) b1 - (char *) BLOCK_ABSTRACT_ORIGIN (b2));
 }
 
 /* Integrate the procedure defined by FNDECL.  Note that this function
index 16e9a9e276b8c6f1ee19225bf47b1fbed65179c0..242db5bb83b2c1f3c317ad12113c8fd4fc2cd6a3 100644 (file)
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -258,7 +258,7 @@ const char * const reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "
                          "REG_EH_RETHROW", "REG_SAVE_NOTE" };
 
 static void fatal_with_file_and_line PARAMS ((FILE *, const char *, ...))
-  ATTRIBUTE_NORETURN;
+  ATTRIBUTE_PRINTF_2 ATTRIBUTE_NORETURN;
 static void fatal_expected_char PARAMS ((FILE *, int, int)) ATTRIBUTE_NORETURN;
 static void read_name          PARAMS ((char *, FILE *));
 static const char *trim_filename PARAMS ((const char *));
index f95b04bf61d34a0aef7bdb0b8847db89e5e73aa7..d3ca9b06fc9e8b6674fc91bf5597d449c6d3e6bf 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1517,7 +1517,7 @@ extern int operands_match_p               PARAMS ((rtx, rtx));
 extern int safe_from_earlyclobber      PARAMS ((rtx, rtx));
 
 /* In stmt.c */
-extern void set_file_and_line_for_stmt PARAMS ((char *, int));
+extern void set_file_and_line_for_stmt PARAMS ((const char *, int));
 extern void expand_null_return         PARAMS ((void));
 extern void emit_jump                  PARAMS ((rtx));
 extern int preserve_subexpressions_p   PARAMS ((void));
index 95ee9809fded0ae7d6656cfbc1b12fa20bc58aa3..7c4c563127d0b0f9fb86f85951cb90d0b99b0f34 100644 (file)
@@ -373,7 +373,7 @@ struct stmt_status
 
   /* Filename and line number of last line-number note,
      whether we actually emitted it or not.  */
-  char *x_emit_filename;
+  const char *x_emit_filename;
   int x_emit_lineno;
 
   struct goto_fixup *x_goto_fixup_chain;
@@ -639,7 +639,7 @@ in_control_zone_p ()
 /* Record the current file and line.  Called from emit_line_note.  */
 void
 set_file_and_line_for_stmt (file, line)
-     char *file;
+     const char *file;
      int line;
 {
   /* If we're outputting an inline function, and we add a line note,
@@ -1351,7 +1351,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
   nclobbers = 0;
   for (tail = clobbers; tail; tail = TREE_CHAIN (tail))
     {
-      char *regname = TREE_STRING_POINTER (TREE_VALUE (tail));
+      const char *regname = TREE_STRING_POINTER (TREE_VALUE (tail));
 
       i = decode_reg_name (regname);
       if (i >= 0 || i == -4)
@@ -1379,7 +1379,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
       tmp = outputs;
       while (tmp)
        {
-         char *constraint = TREE_STRING_POINTER (TREE_PURPOSE (tmp));
+         const char *constraint = TREE_STRING_POINTER (TREE_PURPOSE (tmp));
 
          if (n_occurrences (',', constraint) != nalternatives)
            {
@@ -1797,7 +1797,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
 
       for (tail = clobbers; tail; tail = TREE_CHAIN (tail))
        {
-         char *regname = TREE_STRING_POINTER (TREE_VALUE (tail));
+         const char *regname = TREE_STRING_POINTER (TREE_VALUE (tail));
          int j = decode_reg_name (regname);
 
          if (j < 0)