c-parse.in (yyerror): Const-ification and/or static-ization.

* c-parse.in (yyerror): Const-ification and/or static-ization.
	* c-typeck.c (push_member_name): Likewise.
	* collect2.c (main): Likewise.
	* dbxout.c (dbxout_parms): Likewise.
	* diagnostic.c (format_with_decl): Likewise.
	* dwarf2out.c (output_ranges): Likewise.
	* dwarfout.c (fundamental_type_code): Likewise.
	* except.c (dw2_output_call_site_table): Likewise.
	* gcc.c (do_spec_1): Likewise.
	* genopinit.c (optabs): Likewise.
	* objc/objc-act.c (synth_id_with_class_suffix, start_class,
	gen_declaration_1, handle_impent): Likewise.
	* protoize.c (default_include, in_system_include_dir, abspath):
	Likewise.
	* sched-vis.c (visualize_stall_cycles): Likewise.
	* sdbout.c (plain_type_1, sdbout_end_function,
	sdbout_end_epilogue): Likewise.
	* varasm.c (decode_reg_name): Likewise.

	* 1750a.c (mod_regno_adjust): Likewise.
	* alpha.c (alpha_write_one_linkage,
	unicosmk_output_default_externs): Likewise.
	* arm.c (arm_condition_codes): Likewise.
	* arm.h (arm_condition_codes): Likewise.
	* avr.c (output_movsisf, encode_section_info): Likewise.
	* darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL):
	Likewise.
	* i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
	* i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
	* m88k.c (output_function_profiler): Likewise.
	* mips.c (mips_output_conditional_branch): Likewise.
	* ns32k.c (ns32k_out_reg_names): Likewise.
	* ns32k.h (ns32k_out_reg_names): Likewise.
	* pj.c (pj_output_rval): Likewise.
	* rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise.
	* sparc.c (sparc_flat_function_prologue,
	sparc_flat_function_epilogue): Likewise.

cp:
	* decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
	Const-ification.
	* pt.c (tsubst_decl): Likewise.

f:
	* bad.c (ffebad_finish): Const-ification and/or static-ization.
	* intrin.c (ffeintrin_cmp_name_): Likewise.
	* stc.c (ffestc_R904): Likewise.

java:
	* expr.c (expand_invoke): Const-ification.
	* parse.y (patch_method_invocation): Likewise.

From-SVN: r45581
This commit is contained in:
Kaveh R. Ghazi 2001-09-13 14:37:29 +00:00 committed by Kaveh Ghazi
parent f404402c4e
commit 83182544db
41 changed files with 138 additions and 99 deletions

View File

@ -1,3 +1,43 @@
2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-parse.in (yyerror): Const-ification and/or static-ization.
* c-typeck.c (push_member_name): Likewise.
* collect2.c (main): Likewise.
* dbxout.c (dbxout_parms): Likewise.
* diagnostic.c (format_with_decl): Likewise.
* dwarf2out.c (output_ranges): Likewise.
* dwarfout.c (fundamental_type_code): Likewise.
* except.c (dw2_output_call_site_table): Likewise.
* gcc.c (do_spec_1): Likewise.
* genopinit.c (optabs): Likewise.
* objc/objc-act.c (synth_id_with_class_suffix, start_class,
gen_declaration_1, handle_impent): Likewise.
* protoize.c (default_include, in_system_include_dir, abspath):
Likewise.
* sched-vis.c (visualize_stall_cycles): Likewise.
* sdbout.c (plain_type_1, sdbout_end_function,
sdbout_end_epilogue): Likewise.
* varasm.c (decode_reg_name): Likewise.
* 1750a.c (mod_regno_adjust): Likewise.
* alpha.c (alpha_write_one_linkage,
unicosmk_output_default_externs): Likewise.
* arm.c (arm_condition_codes): Likewise.
* arm.h (arm_condition_codes): Likewise.
* avr.c (output_movsisf, encode_section_info): Likewise.
* darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL):
Likewise.
* i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
* i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
* m88k.c (output_function_profiler): Likewise.
* mips.c (mips_output_conditional_branch): Likewise.
* ns32k.c (ns32k_out_reg_names): Likewise.
* ns32k.h (ns32k_out_reg_names): Likewise.
* pj.c (pj_output_rval): Likewise.
* rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise.
* sparc.c (sparc_flat_function_prologue,
sparc_flat_function_epilogue): Likewise.
2001-09-13 Markus Werle <numerical.simulation@web.de>
Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>

View File

@ -3615,7 +3615,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

View File

@ -4507,7 +4507,7 @@ push_member_name (decl)
tree decl;
{
const char *string
const char *const string
= DECL_NAME (decl) ? IDENTIFIER_POINTER (DECL_NAME (decl)) : "<anonymous>";
PUSH_SPELLING (SPELLING_MEMBER, string, u.s);
}

View File

@ -796,21 +796,21 @@ main (argc, argv)
int argc;
char *argv[];
{
const char *const ld_suffix = "ld";
static const char *const ld_suffix = "ld";
const char *full_ld_suffix = ld_suffix;
const char *const real_ld_suffix = "real-ld";
const char *const collect_ld_suffix = "collect-ld";
const char *const nm_suffix = "nm";
static const char *const real_ld_suffix = "real-ld";
static const char *const collect_ld_suffix = "collect-ld";
static const char *const nm_suffix = "nm";
const char *full_nm_suffix = nm_suffix;
const char *const gnm_suffix = "gnm";
static const char *const gnm_suffix = "gnm";
const char *full_gnm_suffix = gnm_suffix;
#ifdef LDD_SUFFIX
const char *const ldd_suffix = LDD_SUFFIX;
static const char *const ldd_suffix = LDD_SUFFIX;
const char *full_ldd_suffix = ldd_suffix;
#endif
const char *const strip_suffix = "strip";
static const char *const strip_suffix = "strip";
const char *full_strip_suffix = strip_suffix;
const char *const gstrip_suffix = "gstrip";
static const char *const gstrip_suffix = "gstrip";
const char *full_gstrip_suffix = gstrip_suffix;
const char *arg;
FILE *outf;

View File

@ -304,7 +304,7 @@ mod_regno_adjust (instr, op)
rtx *op;
{
static char outstr[40];
const char *r = (!strncmp (instr, "dvr", 3) ? "r" : "");
const char *const r = (!strncmp (instr, "dvr", 3) ? "r" : "");
int modregno_gcc = REGNO (op[3]), modregno_1750 = REGNO (op[0]) + 1;
if (modregno_gcc == modregno_1750

View File

@ -7795,7 +7795,7 @@ alpha_write_one_linkage (node, data)
splay_tree_node node;
void *data;
{
const char *name = (const char *) node->key;
const char *const name = (const char *) node->key;
struct alpha_links *links = (struct alpha_links *) node->value;
FILE *stream = (FILE *) data;
@ -8498,7 +8498,7 @@ static void
unicosmk_output_default_externs (file)
FILE *file;
{
static const char *externs[] =
static const char *const externs[] =
{ "__T3E_MISMATCH" };
int i;

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 *const arm_condition_codes[] =
static const char *const arm_condition_codes[] =
{
"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc",
"hi", "ls", "ge", "lt", "gt", "le", "al", "nv"

View File

@ -61,7 +61,6 @@ typedef enum arm_cond_code
arm_cc;
extern arm_cc arm_current_cc;
extern const char *const arm_condition_codes[];
#define ARM_INVERSE_CONDITION_CODE(X) ((arm_cc) (((int)X) ^ 1))

View File

@ -2363,7 +2363,7 @@ output_movsisf(insn, operands, l)
if (GET_CODE (src) == CONST_INT)
{
const char *clr_op0 =
const char *const clr_op0 =
AVR_ENHANCED ? (AS1 (clr,%A0) CR_TAB
AS1 (clr,%B0) CR_TAB
AS2 (movw,%C0,%A0))
@ -4756,7 +4756,7 @@ encode_section_info (decl)
&& TREE_CODE (decl) == VAR_DECL
&& avr_progmem_p (decl))
{
const char *const dsec = ".progmem.data";
static const char *const dsec = ".progmem.data";
DECL_SECTION_NAME (decl) = build_string (strlen (dsec), dsec);
TREE_READONLY (decl) = 1;
}

View File

@ -719,7 +719,7 @@ enum machopic_addr_class {
#define GEN_BINDER_NAME_FOR_STUB(BUF,STUB,STUB_LENGTH) \
do { \
const char *stub_ = (STUB); \
const char *const stub_ = (STUB); \
char *buffer_ = (BUF); \
strcpy (buffer_, stub_); \
if (stub_[0] == '"') \
@ -734,7 +734,7 @@ enum machopic_addr_class {
#define GEN_SYMBOL_NAME_FOR_SYMBOL(BUF,SYMBOL,SYMBOL_LENGTH) \
do { \
const char *symbol_ = (SYMBOL); \
const char *const symbol_ = (SYMBOL); \
char *buffer_ = (BUF); \
if (name_needs_quotes (symbol_) && symbol_[0] != '"') \
{ \

View File

@ -361,9 +361,9 @@ static int use_fast_prologue_epilogue;
#define AT_BP(mode) (gen_rtx_MEM ((mode), hard_frame_pointer_rtx))
const char * const hi_reg_name[] = HI_REGISTER_NAMES;
const char * const qi_reg_name[] = QI_REGISTER_NAMES;
const char * const qi_high_reg_name[] = QI_HIGH_REGISTER_NAMES;
static const char *const hi_reg_name[] = HI_REGISTER_NAMES; /* names for 16 bit regs */
static const char *const qi_reg_name[] = QI_REGISTER_NAMES; /* names for 8 bit regs (low) */
static const char *const qi_high_reg_name[] = QI_HIGH_REGISTER_NAMES; /* names for 8 bit regs (high) */
/* Array of the smallest class containing reg number REGNO, indexed by
REGNO. Used by REGNO_REG_CLASS in i386.h. */

View File

@ -3095,9 +3095,6 @@ extern const char *ix86_branch_cost_string; /* values 1-5: see jump.c */
extern int ix86_regparm; /* ix86_regparm_string as a number */
extern int ix86_preferred_stack_boundary; /* preferred stack boundary alignment in bits */
extern int ix86_branch_cost; /* values 1-5: see jump.c */
extern const char * const hi_reg_name[]; /* names for 16 bit regs */
extern const char * const qi_reg_name[]; /* names for 8 bit regs (low) */
extern const char * const qi_high_reg_name[]; /* names for 8 bit regs (high) */
extern enum reg_class const regclass_map[]; /* smalled class containing REGNO */
extern struct rtx_def *ix86_compare_op0; /* operand 0 for comparisons */
extern struct rtx_def *ix86_compare_op1; /* operand 1 for comparisons */

View File

@ -2407,7 +2407,7 @@ output_function_profiler (file, labelno, name, savep)
{
char label[256];
char dbi[256];
const char *temp = (savep ? reg_names[2] : reg_names[10]);
const char *const temp = (savep ? reg_names[2] : reg_names[10]);
/* Remember to update FUNCTION_PROFILER_LENGTH. */

View File

@ -9548,7 +9548,7 @@ mips_output_conditional_branch (insn,
would otherwise; that way we skip the annulled instruction
in the delay slot. */
const char *target
const char *const target
= ((mips_branch_likely || length == 16) ? ".+16" : ".+12");
char *c;
@ -9625,7 +9625,7 @@ mips_output_conditional_branch (insn,
anything. */
/* The target of the reversed branch. */
const char *target
const char *const target
= ((mips_branch_likely || length == 20) ? ".+20" : ".+16");
const char *at_register = mips_reg_names[ASSEMBLER_SCRATCH_REGNUM];
const char *gp_register = mips_reg_names[PIC_OFFSET_TABLE_REGNUM];

View File

@ -59,7 +59,7 @@ enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] =
FRAME_POINTER_REG, STACK_POINTER_REG
};
const char *const ns32k_out_reg_names[] = OUTPUT_REGISTER_NAMES;
static const char *const ns32k_out_reg_names[] = OUTPUT_REGISTER_NAMES;
static rtx gen_indexed_expr PARAMS ((rtx, rtx, rtx));
static const char *singlemove_string PARAMS ((rtx *));

View File

@ -1441,7 +1441,6 @@ do { \
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE, ADDR)
extern unsigned int ns32k_reg_class_contents[N_REG_CLASSES][1];
extern const char *const ns32k_out_reg_names[];
extern enum reg_class regclass_map[]; /* smallest class containing REGNO */
/*

View File

@ -400,7 +400,7 @@ pj_output_rval (op, mode, outer_op)
}
else if (tab && tab->handlers[mode].insn_code != CODE_FOR_nothing)
{
const char *template =
const char *const template =
(const char *) insn_data[tab->handlers[mode].insn_code].output;
if (code == NEG)
pj_printf (template, 0, XEXP (op, 0));

View File

@ -8616,7 +8616,7 @@ output_call (insn, call_dest, operand_number)
#define GEN_LOCAL_LABEL_FOR_SYMBOL(BUF,SYMBOL,LENGTH,N) \
do { \
const char *symbol_ = (SYMBOL); \
const char *const symbol_ = (SYMBOL); \
char *buffer_ = (BUF); \
if (symbol_[0] == '"') \
{ \

View File

@ -6702,7 +6702,7 @@ sparc_flat_function_prologue (file, size)
{
unsigned int reg_offset = current_frame_info.reg_offset;
const char *const fp_str = reg_names[FRAME_POINTER_REGNUM];
const char *const t1_str = "%g1";
static 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
@ -6887,7 +6887,7 @@ sparc_flat_function_epilogue (file, size)
unsigned HOST_WIDE_INT size1;
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";
static 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

View File

@ -1,3 +1,9 @@
2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
Const-ification.
* pt.c (tsubst_decl): Likewise.
2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl2.c (lang_f_options): Const-ification.

View File

@ -3028,9 +3028,9 @@ static void
warn_extern_redeclared_static (newdecl, olddecl)
tree newdecl, olddecl;
{
static const char *explicit_extern_static_warning
static const char *const explicit_extern_static_warning
= "`%D' was declared `extern' and later `static'";
static const char *implicit_extern_static_warning
static const char *const implicit_extern_static_warning
= "`%D' was declared implicitly `extern' and later `static'";
tree name;
@ -6574,7 +6574,7 @@ cp_make_fname_decl (id, type_dep)
tree id;
int type_dep;
{
const char *name = (type_dep && processing_template_decl
const char *const name = (type_dep && processing_template_decl
? NULL : fname_as_string (type_dep));
tree init = cp_fname_init (name);
tree decl = build_decl (VAR_DECL, id, TREE_TYPE (init));

View File

@ -5992,7 +5992,7 @@ tsubst_decl (t, args, type)
/* For __PRETTY_FUNCTION__ we have to adjust the initializer. */
if (DECL_PRETTY_FUNCTION_P (r))
{
const char *name = (*decl_printable_name)
const char *const name = (*decl_printable_name)
(current_function_decl, 2);
DECL_INITIAL (r) = cp_fname_init (name);
TREE_TYPE (r) = TREE_TYPE (DECL_INITIAL (r));

View File

@ -2566,7 +2566,7 @@ dbxout_parms (parms)
living on the stack. DECL_RTL looks like
(MEM (MEM (PLUS (REG ...) (CONST_INT ...)))) or it
could look like (MEM (MEM (REG))). */
const char *decl_name = (DECL_NAME (parms)
const char *const decl_name = (DECL_NAME (parms)
? IDENTIFIER_POINTER (DECL_NAME (parms))
: "(anon)");
if (GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 0)) == REG)

View File

@ -866,7 +866,7 @@ format_with_decl (buffer, decl)
if (*p == '%') /* Print the name. */
{
const char *n = (DECL_NAME (decl)
const char *const n = (DECL_NAME (decl)
? (*decl_printable_name) (decl, 2)
: _("((anonymous))"));
output_add_string (buffer, n);

View File

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

View File

@ -1849,7 +1849,7 @@ fundamental_type_code (type)
&& DECL_NAME (TYPE_NAME (type)) != 0
&& TREE_CODE (DECL_NAME (TYPE_NAME (type))) == IDENTIFIER_NODE)
{
const char *name =
const char *const name =
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
if (!strcmp (name, "unsigned char"))
@ -1908,7 +1908,7 @@ fundamental_type_code (type)
&& DECL_NAME (TYPE_NAME (type)) != 0
&& TREE_CODE (DECL_NAME (TYPE_NAME (type))) == IDENTIFIER_NODE)
{
const char *name =
const char *const name =
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
/* Note that here we can run afowl of a serious bug in "classic"

View File

@ -3409,7 +3409,7 @@ sjlj_size_of_call_site_table ()
static void
dw2_output_call_site_table ()
{
const char *function_start_lab
const char *const function_start_lab
= IDENTIFIER_POINTER (current_function_func_begin_label);
int n = cfun->eh->call_site_data_used;
int i;

View File

@ -1,3 +1,9 @@
Thu Sep 13 10:33:27 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* bad.c (ffebad_finish): Const-ification and/or static-ization.
* intrin.c (ffeintrin_cmp_name_): Likewise.
* stc.c (ffestc_R904): Likewise.
Wed Sep 12 12:09:04 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* bld.c (ffebld_op_string_): Const-ification.

View File

@ -349,7 +349,7 @@ void
ffebad_finish ()
{
#define MAX_SPACES 132
static const char *spaces
static const char *const spaces
= "...>\
\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\
\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\

View File

@ -1165,9 +1165,9 @@ ffeintrin_check_any_ (ffebld arglist)
static int
ffeintrin_cmp_name_ (const void *name, const void *intrinsic)
{
const char *uc = ((const struct _ffeintrin_name_ *) intrinsic)->name_uc;
const char *lc = ((const struct _ffeintrin_name_ *) intrinsic)->name_lc;
const char *ic = ((const struct _ffeintrin_name_ *) intrinsic)->name_ic;
const char *const uc = ((const struct _ffeintrin_name_ *) intrinsic)->name_uc;
const char *const lc = ((const struct _ffeintrin_name_ *) intrinsic)->name_lc;
const char *const ic = ((const struct _ffeintrin_name_ *) intrinsic)->name_ic;
return ffesrc_strcmp_2c (ffe_case_intrin (), name, uc, lc, ic);
}

View File

@ -10203,8 +10203,7 @@ ffestc_R904 ()
{
int i;
int expect_file;
const char *const status_strs[]
=
static const char *const status_strs[] =
{
"New",
"Old",
@ -10212,29 +10211,25 @@ ffestc_R904 ()
"Scratch",
"Unknown"
};
const char *const access_strs[]
=
static const char *const access_strs[] =
{
"Append",
"Direct",
"Keyed",
"Sequential"
};
const char *const blank_strs[]
=
static const char *const blank_strs[] =
{
"Null",
"Zero"
};
const char *const carriagecontrol_strs[]
=
static const char *const carriagecontrol_strs[] =
{
"Fortran",
"List",
"None"
};
const char *const dispose_strs[]
=
static const char *const dispose_strs[] =
{
"Delete",
"Keep",
@ -10244,42 +10239,36 @@ ffestc_R904 ()
"Submit",
"Submit/Delete"
};
const char *const form_strs[]
=
static const char *const form_strs[] =
{
"Formatted",
"Unformatted"
};
const char *const organization_strs[]
=
static const char *const organization_strs[] =
{
"Indexed",
"Relative",
"Sequential"
};
const char *const position_strs[]
=
static const char *const position_strs[] =
{
"Append",
"AsIs",
"Rewind"
};
const char *const action_strs[]
=
static const char *const action_strs[] =
{
"Read",
"ReadWrite",
"Write"
};
const char *const delim_strs[]
=
static const char *const delim_strs[] =
{
"Apostrophe",
"None",
"Quote"
};
const char *const recordtype_strs[]
=
static const char *const recordtype_strs[] =
{
"Fixed",
"Segmented",
@ -10288,8 +10277,7 @@ ffestc_R904 ()
"Stream_LF",
"Variable"
};
const char *const pad_strs[]
=
static const char *const pad_strs[] =
{
"No",
"Yes"
@ -10458,8 +10446,7 @@ ffestc_R904 ()
void
ffestc_R907 ()
{
const char *const status_strs[]
=
static const char *const status_strs[] =
{
"Delete",
"Keep",

View File

@ -4580,7 +4580,7 @@ do_spec_1 (spec, inswitch, soft_matched_part)
case 'C':
{
const char* spec
const char *const spec
= (input_file_compiler->cpp_spec
? input_file_compiler->cpp_spec
: cpp_spec);

View File

@ -56,7 +56,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
used for comparisons. In that case, $c and $C are the lower-case and
upper-case forms of the comparison, respectively. */
const char * const optabs[] =
static const char * const optabs[] =
{ "extendtab[$B][$A][0] = CODE_FOR_$(extend$a$b2$)",
"extendtab[$B][$A][1] = CODE_FOR_$(zero_extend$a$b2$)",
"fixtab[$A][$B][0] = CODE_FOR_$(fix$F$a$I$b2$)",

View File

@ -1,3 +1,8 @@
2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* expr.c (expand_invoke): Const-ification.
* parse.y (patch_method_invocation): Likewise.
2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gjavah.c (cxx_keywords): Const-ification.

View File

@ -1916,7 +1916,7 @@ expand_invoke (opcode, method_ref_index, nargs)
tree method_name = COMPONENT_REF_NAME (&current_jcf->cpool, method_ref_index);
tree self_type = get_class_constant
(current_jcf, COMPONENT_REF_CLASS_INDEX(&current_jcf->cpool, method_ref_index));
const char *self_name
const char *const self_name
= IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type)));
tree call, func, method, arg_list, method_type;
tree check = NULL_TREE;

View File

@ -10308,15 +10308,15 @@ patch_method_invocation (patch, primary, where, from_super,
/* Calls to clone() on array types are permitted as a special-case. */
&& !is_array_clone_call)
{
const char *fct_name = IDENTIFIER_POINTER (DECL_NAME (list));
const char *access =
const char *const fct_name = IDENTIFIER_POINTER (DECL_NAME (list));
const char *const access =
java_accstring_lookup (get_access_flags_from_decl (list));
const char *klass =
const char *const klass =
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (list))));
const char *refklass =
const char *const refklass =
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)));
const char *what = (DECL_CONSTRUCTOR_P (list)
? "constructor" : "method");
const char *const what = (DECL_CONSTRUCTOR_P (list)
? "constructor" : "method");
/* FIXME: WFL yields the wrong message here but I don't know
what else to use. */
parse_error_context (wfl,
@ -14828,7 +14828,7 @@ array_constructor_check_entry (type, entry)
/* Check and report errors */
if (!new_value)
{
const char *msg = (!valid_cast_to_p (type_value, type) ?
const char *const msg = (!valid_cast_to_p (type_value, type) ?
"Can't" : "Explicit cast needed to");
if (!array_type_string)
array_type_string = xstrdup (lang_printable_name (type, 1));

View File

@ -4618,7 +4618,7 @@ synth_id_with_class_suffix (preamble, ctxt)
if (TREE_CODE (ctxt) == CLASS_IMPLEMENTATION_TYPE
|| TREE_CODE (ctxt) == CLASS_INTERFACE_TYPE)
{
const char *class_name
const char *const class_name
= IDENTIFIER_POINTER (CLASS_NAME (implementation_context));
string = (char *) alloca (strlen (preamble) + strlen (class_name) + 3);
sprintf (string, "%s_%s", preamble,
@ -4628,9 +4628,9 @@ synth_id_with_class_suffix (preamble, ctxt)
|| TREE_CODE (ctxt) == CATEGORY_INTERFACE_TYPE)
{
/* We have a category. */
const char *class_name
const char *const class_name
= IDENTIFIER_POINTER (CLASS_NAME (implementation_context));
const char *class_super_name
const char *const class_super_name
= IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context));
string = (char *) alloca (strlen (preamble)
+ strlen (class_name)
@ -6252,7 +6252,7 @@ start_class (code, class_name, super_name, protocol_list)
&& (super_name != CLASS_SUPER_NAME (implementation_template)))
{
tree previous_name = CLASS_SUPER_NAME (implementation_template);
const char *name =
const char *const name =
previous_name ? IDENTIFIER_POINTER (previous_name) : "";
error ("conflicting super class name `%s'",
IDENTIFIER_POINTER (super_name));
@ -8046,7 +8046,7 @@ gen_declaration_1 (atype_or_adecl, buf)
|| TREE_CODE (atype_or_adecl) == PARM_DECL
|| TREE_CODE (atype_or_adecl) == FUNCTION_DECL)
{
const char *decl_name =
const char *const decl_name =
(DECL_NAME (atype_or_adecl)
? IDENTIFIER_POINTER (DECL_NAME (atype_or_adecl)) : "");
@ -8506,7 +8506,7 @@ handle_impent (impent)
if (TREE_CODE (impent->imp_context) == CLASS_IMPLEMENTATION_TYPE)
{
const char *class_name =
const char *const class_name =
IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context));
string = (char *) alloca (strlen (class_name) + 30);
@ -8516,9 +8516,9 @@ handle_impent (impent)
}
else if (TREE_CODE (impent->imp_context) == CATEGORY_IMPLEMENTATION_TYPE)
{
const char *class_name =
const char *const class_name =
IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context));
const char *class_super_name =
const char *const class_super_name =
IDENTIFIER_POINTER (CLASS_SUPER_NAME (impent->imp_context));
string = (char *) alloca (strlen (class_name)

View File

@ -205,7 +205,7 @@ static const int hash_mask = (HASH_TABLE_SIZE - 1);
#define LOCAL_INCLUDE_DIR "/usr/local/include"
#endif
struct default_include { const char *const fname;
static const struct default_include { const char *const fname;
const char *const component;
int x1, x2; } include_defaults[]
#ifdef INCLUDE_DEFAULTS
@ -743,7 +743,7 @@ static int
in_system_include_dir (path)
const char *path;
{
struct default_include *p;
const struct default_include *p;
if (! is_abspath (path))
abort (); /* Must be an absolutized filename. */
@ -1195,7 +1195,7 @@ abspath (cwd, rel_filename)
const char *rel_filename;
{
/* Setup the current working directory as needed. */
const char *cwd2 = (cwd) ? cwd : cwd_buffer;
const char *const cwd2 = (cwd) ? cwd : cwd_buffer;
char *const abs_buffer
= (char *) alloca (strlen (cwd2) + strlen (rel_filename) + 2);
char *endp = abs_buffer;

View File

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

View File

@ -516,7 +516,7 @@ plain_type_1 (type, level)
&& DECL_NAME (TYPE_NAME (type)) != 0
&& TREE_CODE (DECL_NAME (TYPE_NAME (type))) == IDENTIFIER_NODE)
{
const char *name
const char *const name
= IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
if (!strcmp (name, "char"))
@ -1679,7 +1679,7 @@ sdbout_end_function (line)
static void
sdbout_end_epilogue ()
{
const char *name
const char *const name
= IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl));
#ifdef PUT_SDB_EPILOGUE_END

View File

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