diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-27 03:35:21 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-27 03:35:21 +0000 |
commit | 33b57a7b900686a43c4535b428313b9fe2b401df (patch) | |
tree | 519da3fd60c83da045d893a8fefdc62a8ecb1bb9 /gcc | |
parent | eeca3ba14c19824758e6cf40bc951fe6fc2fc645 (diff) | |
download | gcc-33b57a7b900686a43c4535b428313b9fe2b401df.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48322 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 15 | ||||
-rw-r--r-- | gcc/collect2.c | 4 | ||||
-rw-r--r-- | gcc/config/m88k/m88k-protos.h | 4 | ||||
-rw-r--r-- | gcc/config/m88k/m88k.c | 20 | ||||
-rw-r--r-- | gcc/fix-header.c | 16 | ||||
-rw-r--r-- | gcc/java/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/java/chartables.h | 82 | ||||
-rw-r--r-- | gcc/java/gjavah.c | 2 | ||||
-rw-r--r-- | gcc/java/jcf-dump.c | 2 | ||||
-rw-r--r-- | gcc/java/jv-scan.c | 2 | ||||
-rw-r--r-- | gcc/java/lex.c | 4 | ||||
-rw-r--r-- | gcc/java/parse.y | 2 | ||||
-rw-r--r-- | gcc/protoize.c | 2 | ||||
-rw-r--r-- | gcc/regclass.c | 2 | ||||
-rw-r--r-- | gcc/toplev.c | 14 | ||||
-rw-r--r-- | gcc/tree-dump.c | 4 | ||||
-rw-r--r-- | gcc/unroll.c | 2 |
17 files changed, 105 insertions, 81 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ea12f65423..4fb732dcce5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/collect2.c b/gcc/collect2.c index 4dd08f045b1..96370e1aca7 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -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 --git a/gcc/config/m88k/m88k-protos.h b/gcc/config/m88k/m88k-protos.h index 93818aea10b..89ab4ae8b09 100644 --- a/gcc/config/m88k/m88k-protos.h +++ b/gcc/config/m88k/m88k-protos.h @@ -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)); diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c index e3ce288da61..467d447f25c 100644 --- a/gcc/config/m88k/m88k.c +++ b/gcc/config/m88k/m88k.c @@ -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; diff --git a/gcc/fix-header.c b/gcc/fix-header.c index e96b6bb0fec..836e840fb82 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -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; ;) { diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 71b1a100a7c..5dd05026920 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -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 diff --git a/gcc/java/chartables.h b/gcc/java/chartables.h index c00c2263081..28de2a4cd9d 100644 --- a/gcc/java/chartables.h +++ b/gcc/java/chartables.h @@ -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 --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c index 1e93ddef4a6..db3e16a9e34 100644 --- a/gcc/java/gjavah.c +++ b/gcc/java/gjavah.c @@ -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 --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c index 6a537de1ef8..16fce909bf0 100644 --- a/gcc/java/jcf-dump.c +++ b/gcc/java/jcf-dump.c @@ -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 --git a/gcc/java/jv-scan.c b/gcc/java/jv-scan.c index bf7fd41812e..4120a2f3700 100644 --- a/gcc/java/jv-scan.c +++ b/gcc/java/jv-scan.c @@ -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 --git a/gcc/java/lex.c b/gcc/java/lex.c index 2fc64dc1882..3509b17e4f3 100644 --- a/gcc/java/lex.c +++ b/gcc/java/lex.c @@ -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 --git a/gcc/java/parse.y b/gcc/java/parse.y index 7c50c971a34..acf00d9f8d5 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -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, diff --git a/gcc/protoize.c b/gcc/protoize.c index 6c6ceee3039..0ab51188943 100644 --- a/gcc/protoize.c +++ b/gcc/protoize.c @@ -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 --git a/gcc/regclass.c b/gcc/regclass.c index 9bdb2b0ea49..7db0223e533 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -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. */ diff --git a/gcc/toplev.c b/gcc/toplev.c index bab08c8edac..e6178162bf9 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -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") }, diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c index 91d6e714c55..fe520793668 100644 --- a/gcc/tree-dump.c +++ b/gcc/tree-dump.c @@ -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 --git a/gcc/unroll.c b/gcc/unroll.c index 6502614daf4..5154b29d65d 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -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. */ |