This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch installed for gcc and java dir const-ification


The following patch const-ifies a bunch of stuff in the toplevel gcc
and java directories.  The major win is for jc1 which transfers 13.5K
from data to rodata, mainly from the stuff in java/chartables.h
getting const-ified.

I tested this by bootstrapping with all languages (which dies building
libjava due to unrelated issues on sparc.)  But there were no warning
regressions.  I also did a bootstrap and testsuite without java and it
passed.  Finally, I did a cross-compile of cc1 to m88k-unknown-sysv4
to test the m88k changes, it compiled.

I installed it as an obvious change.

		--Kaveh



2001-12-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* collect2.c (is_ctor_dtor): Const-ify.
	* m88k-protos.h (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.

diff -rup orig/egcc-CVS20011225/gcc/collect2.c egcc-CVS20011225/gcc/collect2.c
--- orig/egcc-CVS20011225/gcc/collect2.c	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/collect2.c	Tue Dec 25 19:42:20 2001
@@ -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 },
diff -rup orig/egcc-CVS20011225/gcc/config/m88k/m88k-protos.h egcc-CVS20011225/gcc/config/m88k/m88k-protos.h
--- orig/egcc-CVS20011225/gcc/config/m88k/m88k-protos.h	Sun Jul  8 16:30:19 2001
+++ egcc-CVS20011225/gcc/config/m88k/m88k-protos.h	Wed Dec 26 22:25:46 2001
@@ -75,9 +75,9 @@ extern void m88k_va_start PARAMS ((int, 
 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));
diff -rup orig/egcc-CVS20011225/gcc/config/m88k/m88k.c egcc-CVS20011225/gcc/config/m88k/m88k.c
--- orig/egcc-CVS20011225/gcc/config/m88k/m88k.c	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/config/m88k/m88k.c	Tue Dec 25 19:42:20 2001
@@ -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, 
 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;
diff -rup orig/egcc-CVS20011225/gcc/fix-header.c egcc-CVS20011225/gcc/fix-header.c
--- orig/egcc-CVS20011225/gcc/fix-header.c	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/fix-header.c	Tue Dec 25 19:42:20 2001
@@ -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 na
 /* 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; ;)
 	{
diff -rup orig/egcc-CVS20011225/gcc/java/chartables.h egcc-CVS20011225/gcc/java/chartables.h
--- orig/egcc-CVS20011225/gcc/java/chartables.h	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/java/chartables.h	Tue Dec 25 19:42:20 2001
@@ -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,
diff -rup orig/egcc-CVS20011225/gcc/java/gjavah.c egcc-CVS20011225/gcc/java/gjavah.c
--- orig/egcc-CVS20011225/gcc/java/gjavah.c	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/java/gjavah.c	Tue Dec 25 19:42:20 2001
@@ -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 },
diff -rup orig/egcc-CVS20011225/gcc/java/jcf-dump.c egcc-CVS20011225/gcc/java/jcf-dump.c
--- orig/egcc-CVS20011225/gcc/java/jcf-dump.c	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/java/jcf-dump.c	Tue Dec 25 19:42:20 2001
@@ -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 },
diff -rup orig/egcc-CVS20011225/gcc/java/jv-scan.c egcc-CVS20011225/gcc/java/jv-scan.c
--- orig/egcc-CVS20011225/gcc/java/jv-scan.c	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/java/jv-scan.c	Tue Dec 25 19:42:20 2001
@@ -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 },
diff -rup orig/egcc-CVS20011225/gcc/java/lex.c egcc-CVS20011225/gcc/java/lex.c
--- orig/egcc-CVS20011225/gcc/java/lex.c	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/java/lex.c	Tue Dec 25 19:42:20 2001
@@ -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;
 
diff -rup orig/egcc-CVS20011225/gcc/java/parse.y egcc-CVS20011225/gcc/java/parse.y
--- orig/egcc-CVS20011225/gcc/java/parse.y	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/java/parse.y	Tue Dec 25 19:42:20 2001
@@ -357,7 +357,7 @@ struct parser_ctxt *ctxp_for_generation 
    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, 
diff -rup orig/egcc-CVS20011225/gcc/protoize.c egcc-CVS20011225/gcc/protoize.c
--- orig/egcc-CVS20011225/gcc/protoize.c	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/protoize.c	Tue Dec 25 19:42:20 2001
@@ -4531,7 +4531,7 @@ do_processing ()
 #endif /* !defined (UNPROTOIZE) */
 }
 
-static struct option longopts[] =
+static const struct option longopts[] =
 {
   {"version", 0, 0, 'V'},
   {"file_name", 0, 0, 'p'},
diff -rup orig/egcc-CVS20011225/gcc/regclass.c egcc-CVS20011225/gcc/regclass.c
--- orig/egcc-CVS20011225/gcc/regclass.c	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/regclass.c	Tue Dec 25 19:42:20 2001
@@ -155,7 +155,7 @@ HARD_REG_SET reg_class_contents[N_REG_CL
 #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.  */
diff -rup orig/egcc-CVS20011225/gcc/toplev.c egcc-CVS20011225/gcc/toplev.c
--- orig/egcc-CVS20011225/gcc/toplev.c	Wed Dec 26 22:28:03 2001
+++ egcc-CVS20011225/gcc/toplev.c	Tue Dec 25 19:42:20 2001
@@ -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
     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") },
diff -rup orig/egcc-CVS20011225/gcc/tree-dump.c egcc-CVS20011225/gcc/tree-dump.c
--- orig/egcc-CVS20011225/gcc/tree-dump.c	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/tree-dump.c	Tue Dec 25 19:42:20 2001
@@ -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 */
 };
diff -rup orig/egcc-CVS20011225/gcc/unroll.c egcc-CVS20011225/gcc/unroll.c
--- orig/egcc-CVS20011225/gcc/unroll.c	Wed Dec 26 22:26:42 2001
+++ egcc-CVS20011225/gcc/unroll.c	Tue Dec 25 20:30:26 2001
@@ -140,7 +140,7 @@ Software Foundation, 59 Temple Place - S
 
 #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.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]