From 366737236599cfa000227799ecde1c22ce383460 Mon Sep 17 00:00:00 2001 From: ghazi Date: Wed, 12 Sep 2001 16:21:12 +0000 Subject: [PATCH] * gjavah.c (cxx_keywords): Const-ification. * keyword.gperf (java_keyword): Likewise. * lang.c (java_tree_code_name): Likewise. * lex.c (cxx_keywords): Likewise. * parse.y (java_parser_context_suspend, merge_string_cste): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45564 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/ChangeLog | 8 ++++++++ gcc/java/gjavah.c | 2 +- gcc/java/keyword.gperf | 2 +- gcc/java/keyword.h | 2 +- gcc/java/lang.c | 2 +- gcc/java/lex.c | 2 +- gcc/java/parse.y | 8 ++++---- 7 files changed, 17 insertions(+), 9 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index cf7b0f5..ba4a3b2 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,11 @@ +2001-09-12 Kaveh R. Ghazi + + * gjavah.c (cxx_keywords): Const-ification. + * keyword.gperf (java_keyword): Likewise. + * lang.c (java_tree_code_name): Likewise. + * lex.c (cxx_keywords): Likewise. + * parse.y (java_parser_context_suspend, merge_string_cste): Likewise. + 2001-09-11 Richard Henderson * parse.h (ctxp_for_generation): Mark extern. diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c index 47617af..d340e66 100644 --- a/gcc/java/gjavah.c +++ b/gcc/java/gjavah.c @@ -390,7 +390,7 @@ utf8_cmp (str, length, name) /* This is a sorted list of all C++ keywords. */ -static const char *cxx_keywords[] = +static const char *const cxx_keywords[] = { "_Complex", "__alignof", diff --git a/gcc/java/keyword.gperf b/gcc/java/keyword.gperf index 643e584..2d28812 100644 --- a/gcc/java/keyword.gperf +++ b/gcc/java/keyword.gperf @@ -25,7 +25,7 @@ of Sun Microsystems, Inc. in the United States and other countries. The Free Software Foundation is independent of Sun Microsystems, Inc. */ %} -struct java_keyword { const char *name; int token; }; +struct java_keyword { const char *const name; int token; }; #ifdef __GNUC__ __inline #endif diff --git a/gcc/java/keyword.h b/gcc/java/keyword.h index d831dea..7e8832f 100644 --- a/gcc/java/keyword.h +++ b/gcc/java/keyword.h @@ -25,7 +25,7 @@ Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. The Free Software Foundation is independent of Sun Microsystems, Inc. */ -struct java_keyword { const char *name; int token; }; +struct java_keyword { const char *const name; int token; }; #ifdef __GNUC__ __inline #endif diff --git a/gcc/java/lang.c b/gcc/java/lang.c index abfdc88..482d89b 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -89,7 +89,7 @@ int java_tree_code_length[] = { Used for printing out the tree and error messages. */ #define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME, -const char *java_tree_code_name[] = { +static const char *const java_tree_code_name[] = { "@@dummy", #include "java-tree.def" }; diff --git a/gcc/java/lex.c b/gcc/java/lex.c index d221476..926827a 100644 --- a/gcc/java/lex.c +++ b/gcc/java/lex.c @@ -1822,7 +1822,7 @@ utf8_cmp (str, length, name) /* A sorted list of all C++ keywords. */ -static const char *cxx_keywords[] = +static const char *const cxx_keywords[] = { "_Complex", "__alignof", diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 0c544fb..62f231c 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -2774,7 +2774,7 @@ static void java_parser_context_suspend () { /* This makes debugging through java_debug_context easier */ - static const char *name = ""; + static const char *const name = ""; /* Duplicate the previous context, use it to save the globals we're interested in */ @@ -13902,9 +13902,9 @@ merge_string_cste (op1, op2, after) /* Reasonable integer constant can be treated right away */ if (TREE_CODE (op2) == INTEGER_CST && !TREE_CONSTANT_OVERFLOW (op2)) { - static const char *boolean_true = "true"; - static const char *boolean_false = "false"; - static const char *null_pointer = "null"; + static const char *const boolean_true = "true"; + static const char *const boolean_false = "false"; + static const char *const null_pointer = "null"; char ch[3]; const char *string; -- 2.7.4