aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2001-09-12 16:25:07 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2001-09-12 16:25:07 +0000
commit40008eda377fb8e6ff7549230c81767217662791 (patch)
tree0e93950145ea2a73742b649fd03a0f8d97b8ada4 /gcc
parentfd033052f96f8e4c62f981e6923371f0d58278ca (diff)
downloadgcc-40008eda377fb8e6ff7549230c81767217662791.zip
gcc-40008eda377fb8e6ff7549230c81767217662791.tar.gz
gcc-40008eda377fb8e6ff7549230c81767217662791.tar.bz2
decl2.c (lang_f_options): Const-ification.
* decl2.c (lang_f_options): Const-ification. * lex.c (cplus_tree_code_name): Likewise. * spew.c (yyerror): Likewise. From-SVN: r45565
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl2.c2
-rw-r--r--gcc/cp/lex.c2
-rw-r--r--gcc/cp/spew.c2
4 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9562779..f5ce21f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 749b8b5..5c62aca 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -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. */
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index a05dd37..6d8fcb3 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -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"
};
diff --git a/gcc/cp/spew.c b/gcc/cp/spew.c
index 4b7f845..64cf48d 100644
--- a/gcc/cp/spew.c
+++ b/gcc/cp/spew.c
@@ -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