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
This commit is contained in:
Kaveh R. Ghazi 2001-09-12 16:25:07 +00:00 committed by Kaveh Ghazi
parent fd033052f9
commit 40008eda37
4 changed files with 9 additions and 3 deletions

View 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

View 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. */

View 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"
};

View 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