From 98003977fdc476933723efe718151bb1b2a2e107 Mon Sep 17 00:00:00 2001 From: ghazi Date: Wed, 12 Sep 2001 16:25:07 +0000 Subject: [PATCH] * decl2.c (lang_f_options): Const-ification. * lex.c (cplus_tree_code_name): Likewise. * spew.c (yyerror): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45565 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/decl2.c | 2 +- gcc/cp/lex.c | 2 +- gcc/cp/spew.c | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9562779ee19..f5ce21fa299 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2001-09-12 Kaveh R. Ghazi + + * decl2.c (lang_f_options): Const-ification. + * lex.c (cplus_tree_code_name): Likewise. + * spew.c (yyerror): Likewise. + 2001-09-06 Nathan Sidwell PR c++/3986 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 749b8b5cb9f..5c62acaa28d 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 a05dd37b50c..6d8fcb36ad7 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 4b7f84536f7..64cf48dd160 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 -- 2.11.4.GIT