Make argv const char ** in read_md_files etc

gcc/ChangeLog:
	* genattr-common.c (main): Convert argv from
	char ** to const char **.
	* genattr.c (main): Likewise.
	* genattrtab.c (main): Likewise.
	* genautomata.c (initiate_automaton_gen): Likewise.
	(main): Likewise.
	* gencodes.c (main): Likewise.
	* genconditions.c (main): Likewise.
	* genconfig.c (main): Likewise.
	* genconstants.c (main): Likewise.
	* genemit.c (main): Likewise.
	* genenums.c (main): Likewise.
	* genextract.c (main): Likewise.
	* genflags.c (main): Likewise.
	* genmddeps.c (main): Likewise.
	* genopinit.c (main): Likewise.
	* genoutput.c (main): Likewise.
	* genpeep.c (main): Likewise.
	* genpreds.c (main): Likewise.
	* genrecog.c (main): Likewise.
	* gensupport.c (init_rtx_reader_args_cb): Likewise.
	(init_rtx_reader_args): Likewise.
	* gensupport.h (init_rtx_reader_args_cb): Likewise.
	(init_rtx_reader_args): Likewise.
	* gentarget-def.c (main): Likewise.
	* read-md.c (read_md_files): Likewise.
	* read-md.h (read_md_files): Likewise.

From-SVN: r235976
This commit is contained in:
David Malcolm 2016-05-06 15:14:05 +00:00 committed by David Malcolm
parent 9c5e57dfb7
commit 66b0fe8f4e
24 changed files with 59 additions and 28 deletions

View File

@ -1,3 +1,33 @@
2016-05-06 David Malcolm <dmalcolm@redhat.com>
* genattr-common.c (main): Convert argv from
char ** to const char **.
* genattr.c (main): Likewise.
* genattrtab.c (main): Likewise.
* genautomata.c (initiate_automaton_gen): Likewise.
(main): Likewise.
* gencodes.c (main): Likewise.
* genconditions.c (main): Likewise.
* genconfig.c (main): Likewise.
* genconstants.c (main): Likewise.
* genemit.c (main): Likewise.
* genenums.c (main): Likewise.
* genextract.c (main): Likewise.
* genflags.c (main): Likewise.
* genmddeps.c (main): Likewise.
* genopinit.c (main): Likewise.
* genoutput.c (main): Likewise.
* genpeep.c (main): Likewise.
* genpreds.c (main): Likewise.
* genrecog.c (main): Likewise.
* gensupport.c (init_rtx_reader_args_cb): Likewise.
(init_rtx_reader_args): Likewise.
* gensupport.h (init_rtx_reader_args_cb): Likewise.
(init_rtx_reader_args): Likewise.
* gentarget-def.c (main): Likewise.
* read-md.c (read_md_files): Likewise.
* read-md.h (read_md_files): Likewise.
2016-05-06 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (int cmove peephole2s): Use general_reg_operand

View File

@ -61,7 +61,7 @@ gen_attr (md_rtx_info *info)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
bool have_delay = false;
bool have_sched = false;

View File

@ -138,7 +138,7 @@ find_tune_attr (rtx exp)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
bool have_annul_true = false;
bool have_annul_false = false;

View File

@ -5197,7 +5197,7 @@ handle_arg (const char *arg)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
struct attr_desc *attr;
struct insn_def *id;

View File

@ -9300,7 +9300,7 @@ parse_automata_opt (const char *str)
/* The following is top level function to initialize the work of
pipeline hazards description translator. */
static void
initiate_automaton_gen (char **argv)
initiate_automaton_gen (const char **argv)
{
const char *base_name;
@ -9592,7 +9592,7 @@ write_automata (void)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
progname = "genautomata";

View File

@ -47,7 +47,7 @@ gen_insn (md_rtx_info *info)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
progname = "gencodes";

View File

@ -212,7 +212,7 @@ write_writer (void)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
progname = "genconditions";

View File

@ -269,7 +269,7 @@ gen_peephole2 (md_rtx_info *info)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
progname = "genconfig";

View File

@ -75,7 +75,7 @@ print_enum_type (void **slot, void *info ATTRIBUTE_UNUSED)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
progname = "genconstants";

View File

@ -745,7 +745,7 @@ output_peephole2_scratches (rtx split)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
progname = "genemit";

View File

@ -45,7 +45,7 @@ print_enum_type (void **slot, void *info ATTRIBUTE_UNUSED)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
progname = "genenums";

View File

@ -394,7 +394,7 @@ insn_extract (rtx_insn *insn)\n{\n\
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
unsigned int i;
struct extraction *p;

View File

@ -198,7 +198,7 @@ gen_insn (md_rtx_info *info)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
rtx dummy;
rtx *insns;

View File

@ -40,7 +40,7 @@ add_filedep (const char *pathname)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
struct filedep *d;

View File

@ -105,7 +105,7 @@ open_outfile (const char *file_name)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
FILE *h_file, *s_file;
unsigned int i, j, n, last_kind[5];

View File

@ -983,10 +983,10 @@ init_insn_for_nothing (void)
idata_end = &idata->next;
}
extern int main (int, char **);
extern int main (int, const char **);
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
progname = "genoutput";

View File

@ -340,10 +340,10 @@ print_code (RTX_CODE code)
putchar (TOUPPER (*p1));
}
extern int main (int, char **);
extern int main (int, const char **);
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
max_opno = -1;

View File

@ -1618,7 +1618,7 @@ parse_option (const char *opt)
/* Master control. */
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
progname = argv[0];
if (argc <= 1)

View File

@ -5223,7 +5223,7 @@ remove_clobbers (acceptance_type *acceptance_ptr, rtx *pattern_ptr)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
state insn_root, split_root, peephole2_root;

View File

@ -2501,7 +2501,7 @@ check_define_attr_duplicates ()
/* The entry point for initializing the reader. */
bool
init_rtx_reader_args_cb (int argc, char **argv,
init_rtx_reader_args_cb (int argc, const char **argv,
bool (*parse_opt) (const char *))
{
/* Prepare to read input. */
@ -2538,7 +2538,7 @@ init_rtx_reader_args_cb (int argc, char **argv,
/* Programs that don't have their own options can use this entry point
instead. */
bool
init_rtx_reader_args (int argc, char **argv)
init_rtx_reader_args (int argc, const char **argv)
{
return init_rtx_reader_args_cb (argc, argv, 0);
}

View File

@ -125,8 +125,9 @@ struct optab_pattern
};
extern rtx add_implicit_parallel (rtvec);
extern bool init_rtx_reader_args_cb (int, char **, bool (*)(const char *));
extern bool init_rtx_reader_args (int, char **);
extern bool init_rtx_reader_args_cb (int, const char **,
bool (*)(const char *));
extern bool init_rtx_reader_args (int, const char **);
extern bool read_md_rtx (md_rtx_info *);
extern unsigned int get_num_insn_codes ();

View File

@ -279,7 +279,7 @@ add_insn (md_rtx_info *info)
}
int
main (int argc, char **argv)
main (int argc, const char **argv)
{
progname = "gentarget-def";

View File

@ -1063,7 +1063,7 @@ parse_include (const char *arg)
details about the callback's interface. */
bool
read_md_files (int argc, char **argv, bool (*parse_opt) (const char *),
read_md_files (int argc, const char **argv, bool (*parse_opt) (const char *),
directive_handler_t handle_directive)
{
int i;

View File

@ -150,7 +150,7 @@ extern void upcase_string (char *);
extern void traverse_md_constants (htab_trav, void *);
extern void traverse_enum_types (htab_trav, void *);
extern struct enum_type *lookup_enum_type (const char *);
extern bool read_md_files (int, char **, bool (*) (const char *),
extern bool read_md_files (int, const char **, bool (*) (const char *),
directive_handler_t);
#endif /* GCC_READ_MD_H */