collect2.c (is_ctor_dtor): Const-ify.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Thu, 27 Dec 2001 03:35:21 +0000 (03:35 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Thu, 27 Dec 2001 03:35:21 +0000 (03:35 +0000)
* collect2.c (is_ctor_dtor): Const-ify.
* m88k-protos.c (output_file_start): Likewise.
* m88k.c (m88k_lang_independent_options, output_options,
output_file_start): Likewise.
* fix-header.c (files_to_ignore, std_include_entry, include_entry,
std_include_table, main): Likewise.
* protoize.c (longopts): Likewise.
* regclass.c (int_reg_class_contents): Likewise.
* toplev.c (dump_file, f_options, W_options): Make static.
(lang_independent_options, f_options, W_options): Const-ify.
* tree-dump.c (dump_file_info): Likewise.
* unroll.c (_factor): Make static.

java:
* chartables.h: Const-ify.
* gjavah.c (options): Likewise.
* jcf-dump.c (options): Likewise.
* jv-scan.c (options): Likewise.
* lex.c (java_start_char_p, java_part_char_p): Likewise.
* parse.y (binop_lookup): Likewise.

From-SVN: r48322

17 files changed:
gcc/ChangeLog
gcc/collect2.c
gcc/config/m88k/m88k-protos.h
gcc/config/m88k/m88k.c
gcc/fix-header.c
gcc/java/ChangeLog
gcc/java/chartables.h
gcc/java/gjavah.c
gcc/java/jcf-dump.c
gcc/java/jv-scan.c
gcc/java/lex.c
gcc/java/parse.y
gcc/protoize.c
gcc/regclass.c
gcc/toplev.c
gcc/tree-dump.c
gcc/unroll.c

index 5ea12f6..4fb732d 100644 (file)
@@ -1,3 +1,18 @@
+2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * collect2.c (is_ctor_dtor): Const-ify.
+       * m88k-protos.c (output_file_start): Likewise.
+       * m88k.c (m88k_lang_independent_options, output_options,
+       output_file_start): Likewise.
+       * fix-header.c (files_to_ignore, std_include_entry, include_entry,
+       std_include_table, main): Likewise.
+       * protoize.c (longopts): Likewise.
+       * regclass.c (int_reg_class_contents): Likewise.
+       * toplev.c (dump_file, f_options, W_options): Make static.
+       (lang_independent_options, f_options, W_options): Const-ify.
+       * tree-dump.c (dump_file_info): Likewise.
+       * unroll.c (_factor): Make static.
+
 Wed Dec 26 17:55:50 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * config/alpha/alpha.c (alpha_align_insns): Remove warning.
index 4dd08f0..96370e1 100644 (file)
@@ -572,11 +572,11 @@ is_ctor_dtor (s)
   struct names { const char *const name; const int len; const int ret;
     const int two_underscores; };
 
-  struct names *p;
+  const struct names *p;
   int ch;
   const char *orig_s = s;
 
-  static struct names special[] = {
+  static const struct names special[] = {
     { "GLOBAL__I_", sizeof ("GLOBAL__I_")-1, 1, 0 },
     { "GLOBAL__D_", sizeof ("GLOBAL__D_")-1, 2, 0 },
     { "GLOBAL__F_", sizeof ("GLOBAL__F_")-1, 5, 0 },
index 93818ae..89ab4ae 100644 (file)
@@ -75,9 +75,9 @@ extern void m88k_va_start PARAMS ((int, tree, rtx));
 struct m88k_lang_independent_options;
 #endif
 extern void output_file_start PARAMS ((FILE *,
-                                      struct m88k_lang_independent_options *,
+                                      const struct m88k_lang_independent_options *,
                                       int,
-                                      struct m88k_lang_independent_options *,
+                                      const struct m88k_lang_independent_options *,
                                       int));
 
 extern int null_prologue PARAMS ((void));
index e3ce288..467d447 100644 (file)
@@ -1514,16 +1514,16 @@ pc_or_label_ref (op, mode)
 /* This definition must match lang_independent_options from toplev.c.  */
 struct m88k_lang_independent_options
 {
-  const char *string;
-  int *variable;
-  int on_value;
-  const char *description;
+  const char *const string;
+  int *const variable;
+  const int on_value;
+  const char *const description;
 };
 
 static void output_options PARAMS ((FILE *,
-                                   struct m88k_lang_independent_options *,
+                                   const struct m88k_lang_independent_options *,
                                    int,
-                                   struct m88k_lang_independent_options *,
+                                   const struct m88k_lang_independent_options *,
                                    int, int, int, const char *, const char *,
                                    const char *));
 
@@ -1552,8 +1552,8 @@ static void
 output_options (file, f_options, f_len, W_options, W_len,
                pos, max, sep, indent, term)
      FILE *file;
-     struct m88k_lang_independent_options *f_options;
-     struct m88k_lang_independent_options *W_options;
+     const struct m88k_lang_independent_options *f_options;
+     const struct m88k_lang_independent_options *W_options;
      int f_len, W_len;
      int pos;
      int max;
@@ -1599,8 +1599,8 @@ output_options (file, f_options, f_len, W_options, W_len,
 void
 output_file_start (file, f_options, f_len, W_options, W_len)
      FILE *file;
-     struct m88k_lang_independent_options *f_options;
-     struct m88k_lang_independent_options *W_options;
+     const struct m88k_lang_independent_options *f_options;
+     const struct m88k_lang_independent_options *W_options;
      int f_len, W_len;
 {
   register int pos;
index e96b6bb..836e840 100644 (file)
@@ -104,7 +104,7 @@ int missing_extern_C_count = 0;
    directory.  (It might be more efficient to do directory pruning
    earlier in fixproto, but this is simpler and easier to customize.) */
 
-static char *files_to_ignore[] = {
+static const char *const files_to_ignore[] = {
   "X11/",
   FIXPROTO_IGNORE_LIST
   0
@@ -215,9 +215,9 @@ add_symbols (flags, names)
 }
 
 struct std_include_entry {
-  const char *name;
-  symbol_flags flags;
-  namelist names;
+  const char *const name;
+  const symbol_flags flags;
+  const namelist names;
 };
 
 const char NONE[] = "";  /* The empty namelist.  */
@@ -225,9 +225,9 @@ const char NONE[] = "";  /* The empty namelist.  */
 /* Special name to indicate a continuation line in std_include_table.  */
 const char CONTINUED[] = "";
 
-struct std_include_entry *include_entry;
+const struct std_include_entry *include_entry;
 
-struct std_include_entry std_include_table [] = {
+const struct std_include_entry std_include_table [] = {
   { "ctype.h", ANSI_SYMBOL,
       "isalnum\0isalpha\0iscntrl\0isdigit\0isgraph\0islower\0\
 isprint\0ispunct\0isspace\0isupper\0isxdigit\0tolower\0toupper\0" },
@@ -1102,7 +1102,7 @@ main (argc, argv)
 #ifdef FIXPROTO_IGNORE_LIST
   for (i = 0; files_to_ignore[i] != NULL; i++)
     {
-      char *ignore_name = files_to_ignore[i];
+      const char *const ignore_name = files_to_ignore[i];
       int ignore_len = strlen (ignore_name);
       if (strncmp (inc_filename, ignore_name, ignore_len) == 0)
        {
@@ -1134,7 +1134,7 @@ main (argc, argv)
 
   if (include_entry->name != NULL)
     {
-      struct std_include_entry *entry;
+      const struct std_include_entry *entry;
       cur_symbol_table_size = 0;
       for (entry = include_entry; ;)
        {
index 71b1a10..5dd0502 100644 (file)
@@ -1,3 +1,12 @@
+2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * chartables.h: Const-ify.
+       * gjavah.c (options): Likewise.
+       * jcf-dump.c (options): Likewise.
+       * jv-scan.c (options): Likewise.
+       * lex.c (java_start_char_p, java_part_char_p): Likewise.
+       * parse.y (binop_lookup): Likewise.
+
 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
index c00c226..28de2a4 100644 (file)
@@ -7,7 +7,7 @@
 #define LETTER_START 1
 #define LETTER_PART  2
 
-static char page0[256] = {
+static const char page0[256] = {
   (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 
   (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 
   (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 
@@ -87,7 +87,7 @@ static char page0[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START)
 };
 
-static char page2[256] = {
+static const char page2[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -178,7 +178,7 @@ static char page2[256] = {
   0, 0
 };
 
-static char page3[256] = {
+static const char page3[256] = {
   (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 
   (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 
   (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 
@@ -252,7 +252,7 @@ static char page3[256] = {
   (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page4[256] = {
+static const char page4[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -372,7 +372,7 @@ static char page4[256] = {
   (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0
 };
 
-static char page5[256] = {
+static const char page5[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -443,7 +443,7 @@ static char page5[256] = {
   0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page6[256] = {
+static const char page6[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -530,7 +530,7 @@ static char page6[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0
 };
 
-static char page7[256] = {
+static const char page7[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   (LETTER_PART | LETTER_START), (LETTER_PART), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -580,7 +580,7 @@ static char page7[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page9[256] = {
+static const char page9[256] = {
   0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -659,7 +659,7 @@ static char page9[256] = {
   0, 0, 0, 0, 0, 0, 0
 };
 
-static char page10[256] = {
+static const char page10[256] = {
   0, 0, (LETTER_PART), 0, 0, (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -727,7 +727,7 @@ static char page10[256] = {
   (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page11[256] = {
+static const char page11[256] = {
   0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -788,7 +788,7 @@ static char page11[256] = {
   0, 0, 0, 0, 0, 0
 };
 
-static char page12[256] = {
+static const char page12[256] = {
   0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -859,7 +859,7 @@ static char page12[256] = {
   0, 0, 0, 0, 0, 0
 };
 
-static char page13[256] = {
+static const char page13[256] = {
   0, 0, (LETTER_PART), (LETTER_PART), 0, (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -931,7 +931,7 @@ static char page13[256] = {
   (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page14[256] = {
+static const char page14[256] = {
   0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -997,7 +997,7 @@ static char page14[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page15[256] = {
+static const char page15[256] = {
   (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 
   (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 
@@ -1046,7 +1046,7 @@ static char page15[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page16[256] = {
+static const char page16[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -1120,7 +1120,7 @@ static char page16[256] = {
   (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page17[256] = {
+static const char page17[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -1244,7 +1244,7 @@ static char page17[256] = {
   0
 };
 
-static char page18[256] = {
+static const char page18[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -1363,7 +1363,7 @@ static char page18[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START)
 };
 
-static char page19[256] = {
+static const char page19[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -1456,7 +1456,7 @@ static char page19[256] = {
   (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page20[256] = {
+static const char page20[256] = {
   0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -1587,7 +1587,7 @@ static char page20[256] = {
   (LETTER_PART | LETTER_START)
 };
 
-static char page22[256] = {
+static const char page22[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -1701,7 +1701,7 @@ static char page22[256] = {
   0, 0, 0, 0, 0, 0
 };
 
-static char page23[256] = {
+static const char page23[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
@@ -1746,7 +1746,7 @@ static char page23[256] = {
   0, 0
 };
 
-static char page24[256] = {
+static const char page24[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), 
   (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 
   (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 
@@ -1821,7 +1821,7 @@ static char page24[256] = {
   0
 };
 
-static char page30[256] = {
+static const char page30[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -1948,7 +1948,7 @@ static char page30[256] = {
   0
 };
 
-static char page31[256] = {
+static const char page31[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -2060,7 +2060,7 @@ static char page31[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0
 };
 
-static char page32[256] = {
+static const char page32[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 
   (LETTER_PART), (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), 
@@ -2088,7 +2088,7 @@ static char page32[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page33[256] = {
+static const char page33[256] = {
   0, 0, (LETTER_PART | LETTER_START), 0, 0, 0, 0, 
   (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -2124,7 +2124,7 @@ static char page33[256] = {
   0, 0, 0, 0
 };
 
-static char page48[256] = {
+static const char page48[256] = {
   0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 
@@ -2227,7 +2227,7 @@ static char page48[256] = {
   (LETTER_PART | LETTER_START), 0
 };
 
-static char page49[256] = {
+static const char page49[256] = {
   0, 0, 0, 0, 0, (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -2313,7 +2313,7 @@ static char page49[256] = {
   0, 0, 0, 0, 0, 0, 0
 };
 
-static char page52[256] = {
+static const char page52[256] = {
   (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
@@ -2327,7 +2327,7 @@ static char page52[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page77[256] = {
+static const char page77[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
@@ -2375,7 +2375,7 @@ static char page77[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START)
 };
 
-static char page78[256] = {
+static const char page78[256] = {
   (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
@@ -2389,7 +2389,7 @@ static char page78[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page159[256] = {
+static const char page159[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
@@ -2403,7 +2403,7 @@ static char page159[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page164[256] = {
+static const char page164[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -2508,7 +2508,7 @@ static char page164[256] = {
   (LETTER_PART | LETTER_START)
 };
 
-static char page172[256] = {
+static const char page172[256] = {
   (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
@@ -2522,7 +2522,7 @@ static char page172[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page215[256] = {
+static const char page215[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
@@ -2536,7 +2536,7 @@ static char page215[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char page250[256] = {
+static const char page250[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -2571,7 +2571,7 @@ static char page250[256] = {
   0, 0, 0, 0, 0
 };
 
-static char page251[256] = {
+static const char page251[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -2676,7 +2676,7 @@ static char page251[256] = {
   (LETTER_PART | LETTER_START)
 };
 
-static char page253[256] = {
+static const char page253[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 
@@ -2777,7 +2777,7 @@ static char page253[256] = {
   (LETTER_PART | LETTER_START), (LETTER_PART | LETTER_START), 0, 0, 0, 0
 };
 
-static char page254[256] = {
+static const char page254[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, (LETTER_PART), (LETTER_PART), (LETTER_PART), 
   (LETTER_PART), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
@@ -2858,7 +2858,7 @@ static char page254[256] = {
   (LETTER_PART | LETTER_START), 0, 0, (LETTER_PART)
 };
 
-static char page255[256] = {
+static const char page255[256] = {
   0, 0, 0, 0, (LETTER_PART | LETTER_START), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
   (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 
   (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), (LETTER_PART), 
@@ -2950,7 +2950,7 @@ static char page255[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static char *type_table[256] = {
+static const char *const type_table[256] = {
   page0,
   (char *) (LETTER_PART | LETTER_START),
   page2,
index 1e93dde..db3e16a 100644 (file)
@@ -2103,7 +2103,7 @@ DEFUN(process_file, (jcf, out),
 #define OPT_MD        LONG_OPT (12)
 #define OPT_MMD       LONG_OPT (13)
 
-static struct option options[] =
+static const struct option options[] =
 {
   { "classpath", required_argument, NULL, OPT_classpath },
   { "CLASSPATH", required_argument, NULL, OPT_CLASSPATH },
index 6a537de..16fce90 100644 (file)
@@ -778,7 +778,7 @@ DEFUN(process_class, (jcf),
 #define OPT_VERSION   LONG_OPT (3)
 #define OPT_JAVAP     LONG_OPT (4)
 
-static struct option options[] =
+static const struct option options[] =
 {
   { "classpath", required_argument, NULL, OPT_classpath },
   { "CLASSPATH", required_argument, NULL, OPT_CLASSPATH },
index bf7fd41..4120a2f 100644 (file)
@@ -76,7 +76,7 @@ int pedantic = 0;
 #define OPT_VERSION   LONG_OPT (1)
 #define OPT_ENCODING  LONG_OPT (2)
 
-static struct option options[] =
+static const struct option options[] =
 {
   { "help",      no_argument,       NULL, OPT_HELP },
   { "version",   no_argument,       NULL, OPT_VERSION },
index 2fc64dc..3509b17 100644 (file)
@@ -738,7 +738,7 @@ java_start_char_p (c)
      unicode_t c;
 {
   unsigned int hi = c / 256;
-  char *page = type_table[hi];
+  const char *const page = type_table[hi];
   unsigned long val = (unsigned long) page;
   int flags;
 
@@ -758,7 +758,7 @@ java_part_char_p (c)
      unicode_t c;
 {
   unsigned int hi = c / 256;
-  char *page = type_table[hi];
+  const char *const page = type_table[hi];
   unsigned long val = (unsigned long) page;
   int flags;
 
index 7c50c97..acf00d9 100644 (file)
@@ -357,7 +357,7 @@ struct parser_ctxt *ctxp_for_generation = NULL;
    covers both integral/floating point division. The code is changed
    once the type of both operator is worked out.  */
 
-static enum tree_code binop_lookup[19] = 
+static const enum tree_code binop_lookup[19] = 
   { 
     PLUS_EXPR, MINUS_EXPR, MULT_EXPR, RDIV_EXPR, TRUNC_MOD_EXPR,
     LSHIFT_EXPR, RSHIFT_EXPR, URSHIFT_EXPR, 
index 6c6ceee..0ab5118 100644 (file)
@@ -4531,7 +4531,7 @@ do_processing ()
 #endif /* !defined (UNPROTOIZE) */
 }
 \f
-static struct option longopts[] =
+static const struct option longopts[] =
 {
   {"version", 0, 0, 'V'},
   {"file_name", 0, 0, 'p'},
index 9bdb2b0..7db0223 100644 (file)
@@ -155,7 +155,7 @@ HARD_REG_SET reg_class_contents[N_REG_CLASSES];
 #define N_REG_INTS  \
   ((FIRST_PSEUDO_REGISTER + (32 - 1)) / 32)
 
-static unsigned int_reg_class_contents[N_REG_CLASSES][N_REG_INTS] 
+static const unsigned int_reg_class_contents[N_REG_CLASSES][N_REG_INTS] 
   = REG_CLASS_CONTENTS;
 
 /* For each reg class, number of regs it contains.  */
index bab08c8..e617816 100644 (file)
@@ -280,7 +280,7 @@ enum dump_file_index
        "       H JK   OPQ  TUV  YZ"
 */
 
-struct dump_file_info dump_file[DFI_MAX] =
+static struct dump_file_info dump_file[DFI_MAX] =
 {
   { "rtl",     'r', 0, 0, 0 },
   { "sibling",  'i', 0, 0, 0 },
@@ -940,10 +940,10 @@ debug_args[] =
 
 typedef struct
 {
-  const char *string;
-  int *variable;
-  int on_value;
-  const char *description;
+  const char *const string;
+  int *const variable;
+  const int on_value;
+  const char *const description;
 }
 lang_independent_options;
 
@@ -974,7 +974,7 @@ static const param_info lang_independent_params[] = {
     if `-fSTRING' is seen as an option.
    (If `-fno-STRING' is seen as an option, the opposite value is stored.)  */
 
-lang_independent_options f_options[] =
+static const lang_independent_options f_options[] =
 {
   {"eliminate-dwarf2-dups", &flag_eliminate_dwarf2_dups, 1,
    N_("Perform DWARF2 duplicate elimination") },
@@ -1466,7 +1466,7 @@ int warn_missing_noreturn;
 
 /* Likewise for -W.  */
 
-lang_independent_options W_options[] =
+static const lang_independent_options W_options[] =
 {
   {"unused-function", &warn_unused_function, 1,
    N_("Warn when a function is unused") },
index 91d6e71..fe52079 100644 (file)
@@ -785,8 +785,8 @@ dump_node (t, flags, stream)
 /* Define a tree dump switch.  */
 struct dump_file_info
 {
-  const char *suffix;          /* suffix to give output file.  */
-  const char *swtch;           /* command line switch */
+  const char *const suffix;    /* suffix to give output file.  */
+  const char *const swtch;     /* command line switch */
   int flags;                   /* user flags */
   int state;                   /* state of play */
 };
index 6502614..5154b29 100644 (file)
@@ -140,7 +140,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #define NUM_FACTORS 4
 
-struct _factor { int factor, count; }
+static struct _factor { const int factor; int count; }
 factors[NUM_FACTORS] = { {2, 0}, {3, 0}, {5, 0}, {7, 0}};
 
 /* Describes the different types of loop unrolling performed.  */