OSDN Git Service

* c-parse.in (cast_expr): Constify.
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Oct 1999 18:13:38 +0000 (18:13 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Oct 1999 18:13:38 +0000 (18:13 +0000)
        * cccp.c (special_symbol): Likewise.

        * cse.c (hash_cse_reg_info, cse_reg_info_equal_p): Likewise.

        * dwarf2out.c (base_type_die): Likewise.

        * global.c (allocno_compare): Likewise.

        * local-alloc.c (qty_compare_1, qty_sugg_compare_1): Likewise.

        * regclass.c (fix_register): Likewise.

        * rtl.h (fix_register): Likewise.

        * stupid.c (stupid_reg_compare): Likewise.

        * toplev.c (decode_f_option): Likewise.

        * tree.c (build_complex_type): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30196 138bc75d-0d04-0410-961f-82ee72b054a4

16 files changed:
gcc/ChangeLog
gcc/c-parse.c
gcc/c-parse.in
gcc/c-parse.y
gcc/cccp.c
gcc/cse.c
gcc/dwarf2out.c
gcc/global.c
gcc/local-alloc.c
gcc/objc/objc-parse.c
gcc/objc/objc-parse.y
gcc/regclass.c
gcc/rtl.h
gcc/stupid.c
gcc/toplev.c
gcc/tree.c

index 9baf2f1..bfa6bb9 100644 (file)
@@ -1,3 +1,27 @@
+Tue Oct 26 14:10:23 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * c-parse.in (cast_expr): Constify.
+
+       * cccp.c (special_symbol): Likewise.
+
+       * cse.c (hash_cse_reg_info, cse_reg_info_equal_p): Likewise.
+
+       * dwarf2out.c (base_type_die): Likewise.
+
+       * global.c (allocno_compare): Likewise.
+
+       * local-alloc.c (qty_compare_1, qty_sugg_compare_1): Likewise.
+
+       * regclass.c (fix_register): Likewise.
+
+       * rtl.h (fix_register): Likewise.
+
+       * stupid.c (stupid_reg_compare): Likewise.
+
+       * toplev.c (decode_f_option): Likewise.
+
+       * tree.c (build_complex_type): Likewise.
+
 Tue Oct 26 18:35:25 1999  Richard Earnshaw  <rearnsha@arm.com>
 
        * output.h: Don't unnecessarily conditionalize prototypes on TREE_CODE.
index e358450..80cb75c 100644 (file)
@@ -2046,7 +2046,7 @@ case 61:
     break;}
 case 62:
 #line 481 "c-parse.y"
-{ char *name;
+{ const char *name;
                  tree result = pop_init_level (0);
                  tree type = yyvsp[-5].ttype;
                  finish_init ();
index 3259eca..6811b45 100644 (file)
@@ -523,7 +523,7 @@ cast_expr:
                  $2 = groktypename ($2);
                  really_start_incremental_init ($2); }
          initlist_maybe_comma '}'  %prec UNARY
-               { char *name;
+               { const char *name;
                  tree result = pop_init_level (0);
                  tree type = $2;
                  finish_init ();
index f9092d7..0e0b36b 100644 (file)
@@ -478,7 +478,7 @@ cast_expr:
                  $2 = groktypename ($2);
                  really_start_incremental_init ($2); }
          initlist_maybe_comma '}'  %prec UNARY
-               { char *name;
+               { const char *name;
                  tree result = pop_init_level (0);
                  tree type = $2;
                  finish_init ();
index 2a56b23..b5f31a1 100644 (file)
@@ -4261,7 +4261,7 @@ special_symbol (hp, op)
 #ifdef STDC_0_IN_SYSTEM_HEADERS
     if (ip->system_header_p
        && hp->length == 8 && bcmp (hp->name, "__STDC__", 8) == 0
-       && !lookup ((U_CHAR *) "__STRICT_ANSI__", -1, -1))
+       && !lookup ((const U_CHAR *) "__STRICT_ANSI__", -1, -1))
       buf = "0";
 #endif
     if (pcp_inside_if && pcp_outfile)
index a304bc6..d729cb2 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -899,7 +899,7 @@ static unsigned int
 hash_cse_reg_info (el_ptr)
      hash_table_entry_t el_ptr;
 {
-  return ((struct cse_reg_info *) el_ptr)->regno;
+  return ((const struct cse_reg_info *) el_ptr)->regno;
 }
 
 static int
@@ -907,8 +907,8 @@ cse_reg_info_equal_p (el_ptr1, el_ptr2)
      hash_table_entry_t el_ptr1;
      hash_table_entry_t el_ptr2;
 {
-  return (((struct cse_reg_info *) el_ptr1)->regno
-         == ((struct cse_reg_info *) el_ptr2)->regno);
+  return (((const struct cse_reg_info *) el_ptr1)->regno
+         == ((const struct cse_reg_info *) el_ptr2)->regno);
 }
 
 /* Clear the hash table and initialize each register with its own quantity,
index 6732e58..a9ee93c 100644 (file)
@@ -6165,7 +6165,7 @@ base_type_die (type)
      register tree type;
 {
   register dw_die_ref base_type_result;
-  register char *type_name;
+  register const char *type_name;
   register enum dwarf_type encoding;
   register tree name = TYPE_NAME (type);
 
index 17bfaf4..3ca1d9c 100644 (file)
@@ -594,7 +594,7 @@ allocno_compare (v1p, v2p)
      const PTR v1p;
      const PTR v2p;
 {
-  int v1 = *(int *)v1p, v2 = *(int *)v2p;
+  int v1 = *(const int *)v1p, v2 = *(const int *)v2p;
   /* Note that the quotient will never be bigger than
      the value of floor_log2 times the maximum number of
      times a register can occur in one insn (surely less than 100).
index b45f339..ee72b7d 100644 (file)
@@ -1503,7 +1503,7 @@ qty_compare_1 (q1p, q2p)
      const PTR q1p;
      const PTR q2p;
 {
-  register int q1 = *(int *)q1p, q2 = *(int *)q2p;
+  register int q1 = *(const int *)q1p, q2 = *(const int *)q2p;
   register int tem = QTY_CMP_PRI (q2) - QTY_CMP_PRI (q1);
 
   if (tem != 0)
@@ -1543,7 +1543,7 @@ qty_sugg_compare_1 (q1p, q2p)
      const PTR q1p;
      const PTR q2p;
 {
-  register int q1 = *(int *)q1p, q2 = *(int *)q2p;
+  register int q1 = *(const int *)q1p, q2 = *(const int *)q2p;
   register int tem = QTY_CMP_SUGG (q1) - QTY_CMP_SUGG (q2);
 
   if (tem != 0)
index 0a9eb50..1445dbd 100644 (file)
@@ -2529,7 +2529,7 @@ case 64:
     break;}
 case 65:
 #line 507 "objc-parse.y"
-{ char *name;
+{ const char *name;
                  tree result = pop_init_level (0);
                  tree type = yyvsp[-5].ttype;
                  finish_init ();
index 24d39f0..5292430 100644 (file)
@@ -504,7 +504,7 @@ cast_expr:
                  $2 = groktypename ($2);
                  really_start_incremental_init ($2); }
          initlist_maybe_comma '}'  %prec UNARY
-               { char *name;
+               { const char *name;
                  tree result = pop_init_level (0);
                  tree type = $2;
                  finish_init ();
index 1b96085..a2258b7 100644 (file)
@@ -571,7 +571,7 @@ choose_hard_reg_mode (regno, nregs)
 
 void
 fix_register (name, fixed, call_used)
-     char *name;
+     const char *name;
      int fixed, call_used;
 {
   int i;
index 575c01a..629e062 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1565,7 +1565,7 @@ extern void regclass_init         PROTO ((void));
 extern void regclass                   PROTO ((rtx, int));
 extern void reg_scan                   PROTO ((rtx, int, int));
 extern void reg_scan_update            PROTO ((rtx, rtx, int));
-extern void fix_register               PROTO ((char *, int, int));
+extern void fix_register               PROTO ((const char *, int, int));
 
 /* In regmove.c */
 #ifdef BUFSIZ
index b61f744..09ea8ba 100644 (file)
@@ -446,7 +446,7 @@ stupid_reg_compare (r1p, r2p)
      const PTR r1p;
      const PTR r2p;
 {
-  register int r1 = *(int *)r1p, r2 = *(int *)r2p;
+  register int r1 = *(const int *)r1p, r2 = *(const int *)r2p;
   register int len1 = reg_where_dead[r1] - REG_WHERE_BORN (r1);
   register int len2 = reg_where_dead[r2] - REG_WHERE_BORN (r2);
   int tem;
index d8c5819..3f01189 100644 (file)
@@ -4833,14 +4833,14 @@ decode_f_option (arg)
       read_integral_parameter (arg + 13, arg - 2, inline_max_insns);
 #ifdef INSN_SCHEDULING
   else if (!strncmp (arg, "sched-verbose=", 14))
-    fix_sched_param ("verbose", (char *)(arg + 14));
+    fix_sched_param ("verbose", (const char *)(arg + 14));
 #endif
   else if (!strncmp (arg, "fixed-", 6))
-    fix_register ((char *)(arg + 6), 1, 1);
+    fix_register ((const char *)(arg + 6), 1, 1);
   else if (!strncmp (arg, "call-used-", 10))
-    fix_register ((char *)(arg + 10), 0, 1);
+    fix_register ((const char *)(arg + 10), 0, 1);
   else if (!strncmp (arg, "call-saved-", 11))
-    fix_register ((char *)(arg + 11), 0, 0);
+    fix_register ((const char *)(arg + 11), 0, 0);
   else if (!strncmp (arg, "align-loops=", 12))
     align_loops = read_integral_parameter (arg + 12, arg - 2, align_loops);
   else if (!strncmp (arg, "align-functions=", 16))
index 7d01d7c..0d3a776 100644 (file)
@@ -4528,7 +4528,7 @@ build_complex_type (component_type)
      since complex is a fundamental type.  */
   if (write_symbols == DWARF2_DEBUG && ! TYPE_NAME (t))
     {
-      char *name;
+      const char *name;
       if (component_type == char_type_node)
        name = "complex char";
       else if (component_type == signed_char_type_node)