decl2.c (lang_f_options): Const-ification.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 12 Sep 2001 16:25:07 +0000 (16:25 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 12 Sep 2001 16:25:07 +0000 (16:25 +0000)
* decl2.c (lang_f_options): Const-ification.
* lex.c (cplus_tree_code_name): Likewise.
* spew.c (yyerror): Likewise.

From-SVN: r45565

gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/cp/lex.c
gcc/cp/spew.c

index 9562779ee1961683e5b2e9e2f63fdaec0b0f8c71..f5ce21fa299bf8bb07bd49444e8c5d1082b26817 100644 (file)
@@ -1,3 +1,9 @@
+2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * decl2.c (lang_f_options): Const-ification.
+       * lex.c (cplus_tree_code_name): Likewise.
+       * spew.c (yyerror): Likewise.
+
 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR c++/3986
index 749b8b5cb9f986c4243c024077e7e3c4ba5e539f..5c62acaa28da831c55119b1ead0a3ded9f388a2b 100644 (file)
@@ -417,7 +417,7 @@ c_language_kind c_language = clk_cplusplus;
     if `-fSTRING' is seen as an option.
    (If `-fno-STRING' is seen as an option, the opposite value is stored.)  */
 
-static struct { const char *string; int *variable; int on_value;}
+static struct { const char *const string; int *variable; int on_value;}
 lang_f_options[] =
 {
   /* C/C++ options.  */
index a05dd37b50c9b2e54bf22b415e05ca9e740c42bb..6d8fcb36ad7a60c04793c2fd858195b152beffe9 100644 (file)
@@ -235,7 +235,7 @@ static int cplus_tree_code_length[] = {
    Used for printing out the tree and error messages.  */
 #define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
 
-static const char *cplus_tree_code_name[] = {
+static const char *const cplus_tree_code_name[] = {
   "@@dummy",
 #include "cp-tree.def"
 };
index 4b7f84536f73db6eb05328ecd7b586044e813d21..64cf48dd1607e4937ac30520d7e539d30af08b63 100644 (file)
@@ -1482,7 +1482,7 @@ yyerror (msgid)
   else if (last_token == CPP_CHAR || last_token == CPP_WCHAR)
     {
       unsigned int val = TREE_INT_CST_LOW (yylval.ttype);
-      const char *ell = (last_token == CPP_CHAR) ? "" : "L";
+      const char *const ell = (last_token == CPP_CHAR) ? "" : "L";
       if (val <= UCHAR_MAX && ISGRAPH (val))
        error ("%s before %s'%c'", string, ell, val);
       else