OSDN Git Service

* gjavah.c (cxx_keywords): Const-ification.
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Sep 2001 16:21:12 +0000 (16:21 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Sep 2001 16:21:12 +0000 (16:21 +0000)
* 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
gcc/java/gjavah.c
gcc/java/keyword.gperf
gcc/java/keyword.h
gcc/java/lang.c
gcc/java/lex.c
gcc/java/parse.y

index cf7b0f5..ba4a3b2 100644 (file)
@@ -1,3 +1,11 @@
+2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * 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  <rth@redhat.com>
 
        * parse.h (ctxp_for_generation): Mark extern.
index 47617af..d340e66 100644 (file)
@@ -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",
index 643e584..2d28812 100644 (file)
@@ -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
index d831dea..7e8832f 100644 (file)
@@ -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
index abfdc88..482d89b 100644 (file)
@@ -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"
 };
index d221476..926827a 100644 (file)
@@ -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",
index 0c544fb..62f231c 100644 (file)
@@ -2774,7 +2774,7 @@ static void
 java_parser_context_suspend ()
 {
   /* This makes debugging through java_debug_context easier */
-  static const char *name = "<inner buffer context>";
+  static const char *const name = "<inner buffer context>";
 
   /* 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;