c-common.c (c_tree_code_name): Const-ification.

* c-common.c (c_tree_code_name): Const-ification.
	* c-decl.c (c_decode_option): Likewise.
	* c-typeck.c (warn_for_assignment): Likewise.
	* collect2.c (libexts, is_ctor_dtor, main, ignore_library):
	Likewise.
	* cppinit.c (output_deps): Likewise.
	* dependence.c (dependence_string, direction_string): Likewise.
	* dwarf2out.c (output_ranges): Likewise.
	* fixinc/fixfixes.c (emit_gnu_type): Likewise.
	* fixinc/gnu-regex.c (re_error_msgid): Likewise.
	* gcc.c (standard_exec_prefix, standard_exec_prefix_1,
	standard_startfile_prefix, standard_startfile_prefix_1,
	standard_startfile_prefix_2, tooldir_base_prefix,
	standard_bindir_prefix, find_a_file): Likewise.
	* genattrtab.c (make_length_attrs): Likewise.
	* gencheck.c (tree_codes): Likewise.
	* genemit.c (gen_split): Likewise.
	* genrecog.c (special_mode_pred_table): Likewise.
	* graph.c (graph_ext): Likewise.
	* protoize (default_include): Likewise.
	* reload.c (reload_when_needed_name): Likewise.
	* sched-vis.c (visualize_stall_cycles): Likewise.
	* tlink.c (recompile_files): Likewise.
	* toplev.c (decode_g_option): Likewise.
	* tradcpp.c (output_deps): Likewise.
	* varasm.c (decode_reg_name): Likewise.

	* arm.c (arm_condition_codes, strings_fpa, thumb_condition_code):
	Const-ification.
	* arm.md: Likewise.
	* avr.c (avr_regnames, encode_section_info): Likewise.
	* c4x.c (float_reg_names): Likewise.
	* darwin.h (ASM_GLOBALIZE_LABEL): Likewise.
	* elfos.h (const_section): Likewise.
	* i386.c (ix86_comp_type_attributes): Likewise.
	* i386/win32.h (STRIP_NAME_ENCODING): Likewise.
	* ia64/aix.h (UNIQUE_SECTION): Likewise.
	* ia64.c (type_names): Likewise.
	* m68hc11.c (reg_class_names): Likewise.
	* m88k.c (m_options): Likewise.
	* mips.c (mips_output_conditional_branch, mips_unique_section):
	Likewise.
	* rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
	* sparc.c (sparc_flat_function_prologue, sparc_flat_function_epilogue,
	ultra_code_names): Likewise.
	* sparc.h (OVERRIDE_OPTIONS): Likewise.

From-SVN: r45567
This commit is contained in:
Kaveh R. Ghazi 2001-09-12 17:18:03 +00:00 committed by Kaveh Ghazi
parent 19dab7952c
commit 27c38fbec7
40 changed files with 124 additions and 75 deletions

View File

@ -1,3 +1,52 @@
2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-common.c (c_tree_code_name): Const-ification.
* c-decl.c (c_decode_option): Likewise.
* c-typeck.c (warn_for_assignment): Likewise.
* collect2.c (libexts, is_ctor_dtor, main, ignore_library):
Likewise.
* cppinit.c (output_deps): Likewise.
* dependence.c (dependence_string, direction_string): Likewise.
* dwarf2out.c (output_ranges): Likewise.
* fixinc/fixfixes.c (emit_gnu_type): Likewise.
* fixinc/gnu-regex.c (re_error_msgid): Likewise.
* gcc.c (standard_exec_prefix, standard_exec_prefix_1,
standard_startfile_prefix, standard_startfile_prefix_1,
standard_startfile_prefix_2, tooldir_base_prefix,
standard_bindir_prefix, find_a_file): Likewise.
* genattrtab.c (make_length_attrs): Likewise.
* gencheck.c (tree_codes): Likewise.
* genemit.c (gen_split): Likewise.
* genrecog.c (special_mode_pred_table): Likewise.
* graph.c (graph_ext): Likewise.
* protoize (default_include): Likewise.
* reload.c (reload_when_needed_name): Likewise.
* sched-vis.c (visualize_stall_cycles): Likewise.
* tlink.c (recompile_files): Likewise.
* toplev.c (decode_g_option): Likewise.
* tradcpp.c (output_deps): Likewise.
* varasm.c (decode_reg_name): Likewise.
* arm.c (arm_condition_codes, strings_fpa, thumb_condition_code):
Const-ification.
* arm.md: Likewise.
* avr.c (avr_regnames, encode_section_info): Likewise.
* c4x.c (float_reg_names): Likewise.
* darwin.h (ASM_GLOBALIZE_LABEL): Likewise.
* elfos.h (const_section): Likewise.
* i386.c (ix86_comp_type_attributes): Likewise.
* i386/win32.h (STRIP_NAME_ENCODING): Likewise.
* ia64/aix.h (UNIQUE_SECTION): Likewise.
* ia64.c (type_names): Likewise.
* m68hc11.c (reg_class_names): Likewise.
* m88k.c (m_options): Likewise.
* mips.c (mips_output_conditional_branch, mips_unique_section):
Likewise.
* rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
* sparc.c (sparc_flat_function_prologue, sparc_flat_function_epilogue,
ultra_code_names): Likewise.
* sparc.h (OVERRIDE_OPTIONS): Likewise.
2001-09-12 Jakub Jelinek <jakub@redhat.com>
* configure.in (gcc_cv_as_shf_merge): Fix a typo.

View File

@ -4074,7 +4074,7 @@ static int c_tree_code_length[] = {
Used for printing out the tree and error messages. */
#define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
static const char *c_tree_code_name[] = {
static const char *const c_tree_code_name[] = {
"@@dummy",
#include "c-common.def"
};

View File

@ -490,7 +490,7 @@ c_decode_option (argc, argv)
-std=gnu89 default, iso9899:1990 + gnu extensions
-std=gnu99 iso9899:1999 + gnu extensions
*/
const char *argstart = &p[5];
const char *const argstart = &p[5];
if (!strcmp (argstart, "iso9899:1990")
|| !strcmp (argstart, "c89"))

View File

@ -4319,7 +4319,7 @@ warn_for_assignment (msgid, opname, function, argnum)
if (function)
{
/* Function name is known; supply it. */
const char *argstring = _("passing arg %d of `%s'");
const char *const argstring = _("passing arg %d of `%s'");
new_opname = (char *) alloca (IDENTIFIER_LENGTH (function)
+ strlen (argstring) + 1 + 25
/*%d*/ + 1);
@ -4329,7 +4329,7 @@ warn_for_assignment (msgid, opname, function, argnum)
else
{
/* Function name unknown (call through ptr); just give arg number.*/
const char *argnofun = _("passing arg %d of pointer to function");
const char *const argnofun = _("passing arg %d of pointer to function");
new_opname = (char *) alloca (strlen (argnofun) + 1 + 25 /*%d*/ + 1);
sprintf (new_opname, argnofun, argnum);
}

View File

@ -264,7 +264,7 @@ static struct path_prefix cmdline_lib_dirs; /* directories specified with -L */
static struct path_prefix libpath_lib_dirs; /* directories in LIBPATH */
static struct path_prefix *libpaths[3] = {&cmdline_lib_dirs,
&libpath_lib_dirs, NULL};
static const char *libexts[3] = {"a", "so", NULL}; /* possible library extentions */
static const char *const libexts[3] = {"a", "so", NULL}; /* possible library extentions */
#endif
static void handler PARAMS ((int));
@ -557,7 +557,7 @@ static int
is_ctor_dtor (s)
const char *s;
{
struct names { const char *name; int len; int ret; int two_underscores; };
struct names { const char *const name; int len; int ret; int two_underscores; };
register struct names *p;
register int ch;
@ -796,21 +796,21 @@ main (argc, argv)
int argc;
char *argv[];
{
const char *ld_suffix = "ld";
const char *const ld_suffix = "ld";
const char *full_ld_suffix = ld_suffix;
const char *real_ld_suffix = "real-ld";
const char *collect_ld_suffix = "collect-ld";
const char *nm_suffix = "nm";
const char *const real_ld_suffix = "real-ld";
const char *const collect_ld_suffix = "collect-ld";
const char *const nm_suffix = "nm";
const char *full_nm_suffix = nm_suffix;
const char *gnm_suffix = "gnm";
const char *const gnm_suffix = "gnm";
const char *full_gnm_suffix = gnm_suffix;
#ifdef LDD_SUFFIX
const char *ldd_suffix = LDD_SUFFIX;
const char *const ldd_suffix = LDD_SUFFIX;
const char *full_ldd_suffix = ldd_suffix;
#endif
const char *strip_suffix = "strip";
const char *const strip_suffix = "strip";
const char *full_strip_suffix = strip_suffix;
const char *gstrip_suffix = "gstrip";
const char *const gstrip_suffix = "gstrip";
const char *full_gstrip_suffix = gstrip_suffix;
const char *arg;
FILE *outf;
@ -2907,7 +2907,7 @@ if (debug) fprintf (stderr, "found: %s\n", lib_buf);
/* Array of standard AIX libraries which should not
be scanned for ctors/dtors. */
static const char *aix_std_libs[] = {
static const char *const aix_std_libs[] = {
"/unix",
"/lib/libc.a",
"/lib/libm.a",
@ -2931,7 +2931,7 @@ static int
ignore_library (name)
const char *name;
{
const char **p = &aix_std_libs[0];
const char *const *p = &aix_std_libs[0];
while (*p++ != NULL)
if (! strcmp (name, *p)) return 1;
return 0;

View File

@ -283,7 +283,7 @@ rtx arm_target_insn;
int arm_target_label;
/* The condition codes of the ARM, and the inverse function. */
const char * arm_condition_codes[] =
const char *const arm_condition_codes[] =
{
"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc",
"hi", "ls", "ge", "lt", "gt", "le", "al", "nv"
@ -2834,7 +2834,7 @@ arm_adjust_cost (insn, link, dep, cost)
static int fpa_consts_inited = 0;
static const char * strings_fpa[8] =
static const char *const strings_fpa[8] =
{
"0", "1", "2", "3",
"4", "5", "0.5", "10"
@ -10609,7 +10609,7 @@ thumb_condition_code (x, invert)
rtx x;
int invert;
{
static const char * conds[] =
static const char *const conds[] =
{
"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc",
"hi", "ls", "ge", "lt", "gt", "le"

View File

@ -61,7 +61,7 @@ typedef enum arm_cond_code
arm_cc;
extern arm_cc arm_current_cc;
extern const char * arm_condition_codes[];
extern const char *const arm_condition_codes[];
#define ARM_INVERSE_CONDITION_CODE(X) ((arm_cc) (((int)X) ^ 1))
@ -2800,7 +2800,7 @@ extern int making_const_table;
do \
{ \
int mi_delta = (DELTA); \
const char * mi_op = mi_delta < 0 ? "sub" : "add"; \
const char *const mi_op = mi_delta < 0 ? "sub" : "add"; \
int shift = 0; \
int this_regno = (aggregate_value_p (TREE_TYPE (TREE_TYPE (FUNCTION))) \
? 1 : 0); \

View File

@ -7371,7 +7371,7 @@
"TARGET_ARM"
"*
{
const char * opcodes[4][2] =
static const char *const opcodes[4][2] =
{
{\"cmp\\t%2, %3\;cmp%d5\\t%0, %1\",
\"cmp\\t%0, %1\;cmp%d4\\t%2, %3\"},
@ -7406,7 +7406,7 @@
"TARGET_ARM"
"*
{
const char * opcodes[4][2] =
static const char *const opcodes[4][2] =
{
{\"cmp\\t%0, %1\;cmp%D4\\t%2, %3\",
\"cmp\\t%2, %3\;cmp%D5\\t%0, %1\"},

View File

@ -77,7 +77,7 @@ rtx zero_reg_rtx;
rtx ldi_reg_rtx;
/* AVR register names {"r0", "r1", ..., "r31"} */
const char * avr_regnames[] = REGISTER_NAMES;
static const char *const avr_regnames[] = REGISTER_NAMES;
/* This holds the last insn address. */
static int last_insn_address = 0;
@ -4756,7 +4756,7 @@ encode_section_info (decl)
&& TREE_CODE (decl) == VAR_DECL
&& avr_progmem_p (decl))
{
const char *dsec = ".progmem.data";
const char *const dsec = ".progmem.data";
DECL_SECTION_NAME (decl) = build_string (strlen (dsec), dsec);
TREE_READONLY (decl) = 1;
}

View File

@ -65,7 +65,7 @@ rtx floatunshihf2_libfunc;
static int c4x_leaf_function;
static const char *float_reg_names[] = FLOAT_REGISTER_NAMES;
static const char *const float_reg_names[] = FLOAT_REGISTER_NAMES;
/* Array of the smallest class containing reg number REGNO, indexed by
REGNO. Used by REGNO_REG_CLASS in c4x.h. We assume that all these

View File

@ -669,7 +669,7 @@ void alias_section (name, alias) \
#undef ASM_GLOBALIZE_LABEL
#define ASM_GLOBALIZE_LABEL(FILE,NAME) \
do { const char* _x = (NAME); if (!!strncmp (_x, "_OBJC_", 6)) { \
do { const char *const _x = (NAME); if (!!strncmp (_x, "_OBJC_", 6)) { \
(fputs (".globl ", FILE), assemble_name (FILE, _x), fputs ("\n", FILE)); \
}} while (0)

View File

@ -313,7 +313,7 @@ const_section () \
const char *name; \
char *string; \
const char *prefix; \
static const char *prefixes[4][2] = \
static const char *const prefixes[4][2] = \
{ \
{ ".text.", ".gnu.linkonce.t." }, \
{ ".rodata.", ".gnu.linkonce.r." }, \

View File

@ -1124,7 +1124,7 @@ ix86_comp_type_attributes (type1, type2)
tree type2;
{
/* Check for mismatch of non-default calling convention. */
const char *rtdstr = TARGET_RTD ? "cdecl" : "stdcall";
const char *const rtdstr = TARGET_RTD ? "cdecl" : "stdcall";
if (TREE_CODE (type1) != FUNCTION_TYPE)
return 1;

View File

@ -145,7 +145,7 @@ while (0)
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
do { \
const char *_p; \
const char *_name = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*')); \
const char *const _name = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*'));\
for (_p = _name; *_p && *_p != '@'; ++_p) \
; \
if (*_p == '@') \

View File

@ -204,7 +204,7 @@ extern unsigned int ia64_section_threshold;
const char *name; \
char *string; \
const char *prefix; \
static const char *prefixes[/*4*/3][2] = \
static const char *const prefixes[/*4*/3][2] = \
{ \
{ ".text.", ".gnu.linkonce.t." }, \
{ ".rodata.", ".gnu.linkonce.r." }, \

View File

@ -5079,7 +5079,7 @@ static struct ia64_packet packets[NR_PACKETS];
/* Map attr_type to a string with the name. */
static const char *type_names[] =
static const char *const type_names[] =
{
"UNKNOWN", "A", "I", "M", "F", "B", "L", "X", "S"
};

View File

@ -301,7 +301,7 @@ m68hc11_conditional_register_usage ()
/* Reload and register operations. */
static const char *reg_class_names[] = REG_CLASS_NAMES;
static const char *const reg_class_names[] = REG_CLASS_NAMES;
void

View File

@ -1534,7 +1534,7 @@ output_option (file, sep, type, name, indent, pos, max)
return pos + fprintf (file, "%s%s%s", sep, type, name);
}
static struct { const char *name; int value; } m_options[] = TARGET_SWITCHES;
static struct { const char *const name; int value; } m_options[] = TARGET_SWITCHES;
static void
output_options (file, f_options, f_len, W_options, W_len,

View File

@ -9445,9 +9445,9 @@ mips_output_conditional_branch (insn,
operand. */
const char *op2 = (two_operands_p ? ",%z3" : ",%.");
/* The operand-printing string for the comparison. */
const char *comp = (float_p ? "%F0" : "%C0");
const char *const comp = (float_p ? "%F0" : "%C0");
/* The operand-printing string for the inverted comparison. */
const char *inverted_comp = (float_p ? "%W0" : "%N0");
const char *const inverted_comp = (float_p ? "%W0" : "%N0");
/* The MIPS processors (for levels of the ISA at least two), have
"likely" variants of each branch instruction. These instructions
@ -9801,7 +9801,7 @@ mips_unique_section (decl, reloc)
int len, size, sec;
const char *name, *prefix;
char *string;
static const char *prefixes[4][2] = {
static const char *const prefixes[4][2] = {
{ ".text.", ".gnu.linkonce.t." },
{ ".rodata.", ".gnu.linkonce.r." },
{ ".data.", ".gnu.linkonce.d." },

View File

@ -630,7 +630,7 @@ extern int rs6000_pic_labelno;
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
do { \
const char *init_ptr = (TARGET_64BIT) ? ".quad" : ".long"; \
const char *const init_ptr = (TARGET_64BIT) ? ".quad" : ".long"; \
\
if (TARGET_RELOCATABLE && (get_pool_size () != 0 || profile_flag) \
&& uses_TOC()) \

View File

@ -6701,8 +6701,8 @@ sparc_flat_function_prologue (file, size)
if (size > 0)
{
unsigned int reg_offset = current_frame_info.reg_offset;
const char *fp_str = reg_names[FRAME_POINTER_REGNUM];
const char *t1_str = "%g1";
const char *const fp_str = reg_names[FRAME_POINTER_REGNUM];
const char *const t1_str = "%g1";
/* Things get a little tricky if local variables take up more than ~4096
bytes and outgoing arguments take up more than ~4096 bytes. When that
@ -6885,9 +6885,9 @@ sparc_flat_function_epilogue (file, size)
{
unsigned HOST_WIDE_INT reg_offset = current_frame_info.reg_offset;
unsigned HOST_WIDE_INT size1;
const char *sp_str = reg_names[STACK_POINTER_REGNUM];
const char *fp_str = reg_names[FRAME_POINTER_REGNUM];
const char *t1_str = "%g1";
const char *const sp_str = reg_names[STACK_POINTER_REGNUM];
const char *const fp_str = reg_names[FRAME_POINTER_REGNUM];
const char *const t1_str = "%g1";
/* In the reload sequence, we don't need to fill the load delay
slots for most of the loads, also see if we can fill the final
@ -7380,7 +7380,7 @@ enum ultra_code { NONE=0, /* no insn at all */
static enum ultra_code ultra_code_from_mask PARAMS ((int));
static void ultra_schedule_insn PARAMS ((rtx *, rtx *, int, enum ultra_code));
static const char *ultra_code_names[NUM_ULTRA_CODES] = {
static const char *const ultra_code_names[NUM_ULTRA_CODES] = {
"NONE", "IEU0", "IEU1", "IEUN", "LSU", "CTI",
"FPM", "FPA", "SINGLE" };

View File

@ -400,7 +400,7 @@ Unrecognized value in TARGET_CPU_DEFAULT.
{ \
if (flag_pic) \
{ \
const char *pic_string = (flag_pic == 1) ? "-fpic" : "-fPIC";\
const char *const pic_string = (flag_pic == 1) ? "-fpic" : "-fPIC";\
warning ("%s and profiling conflict: disabling %s", \
pic_string, pic_string); \
flag_pic = 0; \

View File

@ -1032,7 +1032,8 @@ output_deps (pfile)
{
/* Stream on which to print the dependency information. */
FILE *deps_stream = 0;
const char *deps_mode = CPP_OPTION (pfile, print_deps_append) ? "a" : "w";
const char *const deps_mode =
CPP_OPTION (pfile, print_deps_append) ? "a" : "w";
if (CPP_OPTION (pfile, deps_file) == 0)
deps_stream = stdout;

View File

@ -61,11 +61,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
enum dependence_type {dt_flow, dt_anti, dt_output, dt_none};
#if 0
static const char * dependence_string [] = {"flow", "anti", "output", "none"};
static const char *const dependence_string [] = {"flow", "anti", "output", "none"};
#endif
enum direction_type {lt, le, eq, gt, ge, star, independent, undef};
#if 0
static const char * direction_string [] = {"<", "<=", "=", ">", ">=", "*",
static const char *const direction_string [] = {"<", "<=", "=", ">", ">=", "*",
"INDEPENDENT", "UNDEFINED"};
#endif
enum def_use_type {def, use, init_def_use};

View File

@ -6508,7 +6508,7 @@ static void
output_ranges ()
{
register unsigned i;
const char *start_fmt = "Offset 0x%x";
const char *const start_fmt = "Offset 0x%x";
const char *fmt = start_fmt;
for (i = 0; i < ranges_table_in_use; ++i)

View File

@ -164,7 +164,7 @@ emit_gnu_type ( text, rm )
typedef __%s_TYPE__ %s_t;\n\
#endif\n";
const char* pz_guard = (strcmp (z_type, "wchar") == 0)
const char *const pz_guard = (strcmp (z_type, "wchar") == 0)
? " && ! defined(__cplusplus)" : "";
printf (z_fmt, z_TYPE, pz_guard, z_TYPE, z_TYPE, z_type);

View File

@ -947,7 +947,7 @@ weak_alias (__re_set_syntax, re_set_syntax)
POSIX doesn't require that we do anything for REG_NOERROR,
but why not be nice? */
static const char *re_error_msgid[] =
static const char *const re_error_msgid[] =
{
gettext_noop ("Success"), /* REG_NOERROR */
gettext_noop ("No match"), /* REG_NOMATCH */

View File

@ -1280,20 +1280,20 @@ static const char *gcc_exec_prefix;
#define STANDARD_BINDIR_PREFIX "/usr/local/bin"
#endif
static const char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
static const char *standard_exec_prefix_1 = "/usr/lib/gcc/";
static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
static const char *const standard_exec_prefix_1 = "/usr/lib/gcc/";
static const char *md_exec_prefix = MD_EXEC_PREFIX;
static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
static const char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
static const char *standard_startfile_prefix_1 = "/lib/";
static const char *standard_startfile_prefix_2 = "/usr/lib/";
static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
static const char *const standard_startfile_prefix_1 = "/lib/";
static const char *const standard_startfile_prefix_2 = "/usr/lib/";
static const char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
static const char *const tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
static const char *tooldir_prefix;
static const char *standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
/* Subdirectory to use for locating libraries. Set by
set_multilib_dir based on the compilation options. */
@ -2436,7 +2436,8 @@ find_a_file (pprefix, name, mode)
int mode;
{
char *temp;
const char *file_suffix = ((mode & X_OK) != 0 ? HOST_EXECUTABLE_SUFFIX : "");
const char *const file_suffix =
((mode & X_OK) != 0 ? HOST_EXECUTABLE_SUFFIX : "");
struct prefix_list *pl;
int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1;

View File

@ -2445,7 +2445,7 @@ substitute_address (exp, no_address_fn, address_fn)
static void
make_length_attrs ()
{
static const char *new_names[] = {"*insn_default_length",
static const char *const new_names[] = {"*insn_default_length",
"*insn_variable_length_p",
"*insn_current_length"};
static rtx (*no_address_fn[]) PARAMS ((rtx)) = {identity_fn, zero_fn, zero_fn};

View File

@ -23,7 +23,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define DEFTREECODE(SYM, NAME, TYPE, LEN) STRINGX(SYM),
const char *tree_codes[] = {
static const char *const tree_codes[] = {
#include "tree.def"
#include "c-common.def"
#include "gencheck.h"

View File

@ -558,12 +558,10 @@ gen_split (split)
{
register int i;
int operands;
const char *name = "split";
const char *const name =
((GET_CODE (split) == DEFINE_PEEPHOLE2) ? "peephole2" : "split");
const char *unused;
if (GET_CODE (split) == DEFINE_PEEPHOLE2)
name = "peephole2";
if (XVEC (split, 0) == 0)
fatal ("define_%s (definition %d) lacks a pattern", name,
insn_index_number);

View File

@ -216,7 +216,7 @@ static struct pred_table
#define NUM_KNOWN_PREDS ARRAY_SIZE (preds)
static const char * special_mode_pred_table[] = {
static const char *const special_mode_pred_table[] = {
#ifdef SPECIAL_MODE_PREDICATES
SPECIAL_MODE_PREDICATES
#endif

View File

@ -31,7 +31,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "toplev.h"
#include "graph.h"
static const char *graph_ext[] =
static const char *const graph_ext[] =
{
/* no_graph */ "",
/* vcg */ ".vcg",

View File

@ -205,8 +205,8 @@ static const int hash_mask = (HASH_TABLE_SIZE - 1);
#define LOCAL_INCLUDE_DIR "/usr/local/include"
#endif
struct default_include { const char *fname;
const char *component;
struct default_include { const char *const fname;
const char *const component;
int x1, x2; } include_defaults[]
#ifdef INCLUDE_DEFAULTS
= INCLUDE_DEFAULTS;

View File

@ -6743,7 +6743,7 @@ regno_clobbered_p (regno, insn, mode, sets)
return 0;
}
static const char *reload_when_needed_name[] =
static const char *const reload_when_needed_name[] =
{
"RELOAD_FOR_INPUT",
"RELOAD_FOR_OUTPUT",

View File

@ -905,7 +905,7 @@ void
visualize_stall_cycles (stalls)
int stalls;
{
const char *prefix = ";; ";
const char *const prefix = ";; ";
const char *suffix = "\n";
char *p;

View File

@ -502,7 +502,7 @@ recompile_files ()
{
char *line, *command;
FILE *stream = fopen ((char*) f->root.key, "r");
const char *outname = frob_extension ((char*) f->root.key, ".rnw");
const char *const outname = frob_extension ((char*) f->root.key, ".rnw");
FILE *output = fopen (outname, "w");
while ((line = tfgets (stream)) != NULL)

View File

@ -4222,7 +4222,7 @@ decode_g_option (arg)
-gdwarf -g3 is equivalent to -gdwarf3. */
static int type_explicitly_set_p = 0;
/* Indexed by enum debug_info_type. */
static const char *debug_type_names[] =
static const char *const debug_type_names[] =
{
"none", "stabs", "coff", "dwarf-1", "dwarf-2", "xcoff"
};

View File

@ -1038,7 +1038,7 @@ output_deps ()
{
/* Stream on which to print the dependency information. */
FILE *deps_stream = 0;
const char *deps_mode = deps_append ? "a" : "w";
const char *const deps_mode = deps_append ? "a" : "w";
if (deps_file == 0)
deps_stream = stdout;

View File

@ -747,7 +747,7 @@ decode_reg_name (asmspec)
#ifdef ADDITIONAL_REGISTER_NAMES
{
static struct { const char *name; int number; } table[]
static struct { const char *const name; int number; } table[]
= ADDITIONAL_REGISTER_NAMES;
for (i = 0; i < (int) ARRAY_SIZE (table); i++)