+2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
+
+ * diagnostic.c: Eliminate implicit int.
+ * except.c, gcc.c: Add static prototypes.
+ * final.c (final_end_function): Mark file arg ATTRIBUTE_UNUSED.
+ * gensupport.c (process_rtx): Use XVEC to initialize vector
+ slot of 'split'.
+
+ * print-rtl.c: If DEBUG_REGISTER_NAMES, define static
+ debug_reg_names instead of static reg_names. If not, define
+ global reg_names.
+ * regclass.c: Don't define global reg_names unless
+ DEBUG_REGISTER_NAMES is defined.
+
+ * reload1.c (order_regs_for_reload): Remove unused variable.
+ * varasm.c: Include output.h after defaults.h. Define
+ eh_frame_section as function of no args, not of unspecified args.
+
+ * gcc.c: Constify argbuf; arguments to store_arg,
+ process_command, main; elements of struct command and struct
+ switchstr; local variables in execute, process_command, main.
+
2000-05-20 Bruce Korb <bkorb@gnu.org>
* fixinc/inclhack.def: more applications of c_fix=format + tests
static void free_split_directories PARAMS ((char **));
static char *make_relative_prefix PARAMS ((const char *, const char *, const char *));
#endif /* VMS */
+static void store_arg PARAMS ((const char *, int, int));
+static char *load_specs PARAMS ((const char *));
static void read_specs PARAMS ((const char *, int));
static void set_spec PARAMS ((const char *, const char *));
static struct compiler *lookup_compiler PARAMS ((const char *, size_t, const char *));
static char *find_a_file PARAMS ((struct path_prefix *, const char *, int));
static void add_prefix PARAMS ((struct path_prefix *, const char *,
const char *, int, int, int *));
+static void translate_options PARAMS ((int *, const char ***));
static char *skip_whitespace PARAMS ((char *));
static void record_temp_file PARAMS ((const char *, int, int));
static void delete_if_ordinary PARAMS ((const char *));
static void add_preprocessor_option PARAMS ((const char *, int));
static void add_assembler_option PARAMS ((const char *, int));
static void add_linker_option PARAMS ((const char *, int));
-static void process_command PARAMS ((int, char **));
+static void process_command PARAMS ((int, const char **));
static int execute PARAMS ((void));
static void unused_prefix_warnings PARAMS ((struct path_prefix *));
static void clear_args PARAMS ((void));
/* Vector of pointers to arguments in the current line of specifications. */
-static char **argbuf;
+static const char **argbuf;
/* Number of elements allocated in argbuf. */
static void
store_arg (arg, delete_always, delete_failure)
- char *arg;
+ const char *arg;
int delete_always, delete_failure;
{
if (argbuf_index + 1 == argbuf_length)
argbuf
- = (char **) xrealloc (argbuf, (argbuf_length *= 2) * sizeof (char *));
+ = (const char **) xrealloc (argbuf,
+ (argbuf_length *= 2) * sizeof (const char *));
argbuf[argbuf_index++] = arg;
argbuf[argbuf_index] = 0;
struct command
{
const char *prog; /* program name. */
- char **argv; /* vector of args. */
+ const char **argv; /* vector of args. */
int pid; /* pid of process for this command. */
};
/* Print each piped command as a separate line. */
for (i = 0; i < n_commands ; i++)
{
- char **j;
+ const char **j;
for (j = commands[i].argv; *j; j++)
fprintf (stderr, " %s", *j);
for (i = 0; i < n_commands; i++)
{
char *errmsg_fmt, *errmsg_arg;
- char *string = commands[i].argv[0];
+ const char *string = commands[i].argv[0];
commands[i].pid = pexecute (string, commands[i].argv,
programname, temp_filename,
pfatal_pexecute (errmsg_fmt, errmsg_arg);
if (string != commands[i].prog)
- free (string);
+ free ((PTR) string);
}
execution_count++;
struct switchstr
{
const char *part1;
- char **args;
+ const char **args;
int live_cond;
int validated;
};
static void
process_command (argc, argv)
int argc;
- char **argv;
+ const char **argv;
{
register int i;
const char *temp;
char *temp1;
- char *spec_lang = 0;
+ const char *spec_lang = 0;
int last_language_n_infiles;
int have_c = 0;
int have_o = 0;
report_times = 1;
else if (argv[i][0] == '-' && argv[i][1] != 0)
{
- register char *p = &argv[i][1];
+ register const char *p = &argv[i][1];
register int c = *p;
switch (c)
case 'B':
{
- char *value;
+ const char *value;
if (p[1] == 0 && i + 1 == argc)
fatal ("argument to `-B' is missing");
if (p[1] == 0)
}
else if (argv[i][0] == '-' && argv[i][1] != 0)
{
- register char *p = &argv[i][1];
- register int c = *p;
+ const char *p = &argv[i][1];
+ int c = *p;
if (c == 'x')
{
if (i + n_args >= argc)
fatal ("argument to `-%s' is missing", p);
switches[n_switches].args
- = (char **) xmalloc ((n_args + 1) * sizeof (char *));
+ = (const char **) xmalloc ((n_args + 1) * sizeof(const char *));
while (j < n_args)
switches[n_switches].args[j++] = argv[++i];
/* Null-terminate the vector. */
/* On some systems, ld cannot handle some options without
a space. So split the option from its argument. */
char *part1 = (char *) xmalloc (2);
+ char *tmp;
part1[0] = c;
part1[1] = '\0';
switches[n_switches].part1 = part1;
- switches[n_switches].args = (char **) xmalloc (2 * sizeof (char *));
- switches[n_switches].args[0] = xmalloc (strlen (p));
- strcpy (switches[n_switches].args[0], &p[1]);
+ switches[n_switches].args
+ = (const char **) xmalloc (2 * sizeof (const char *));
+ switches[n_switches].args[0] = tmp = xmalloc (strlen (p));
+ strcpy (tmp, &p[1]);
switches[n_switches].args[1] = 0;
}
else
if (switches[switchnum].args != 0)
{
- char **p;
+ const char **p;
for (p = switches[switchnum].args; *p; p++)
{
if (include_blanks)
kill (getpid (), signum);
}
-extern int main PARAMS ((int, char **));
+extern int main PARAMS ((int, const char **));
int
main (argc, argv)
int argc;
- char **argv;
+ const char **argv;
{
register size_t i;
size_t j;
#endif
argbuf_length = 10;
- argbuf = (char **) xmalloc (argbuf_length * sizeof (char *));
+ argbuf = (const char **) xmalloc (argbuf_length * sizeof (const char *));
obstack_init (&obstack);
first_time = TRUE;
for (i = 0; (int)i < n_switches; i++)
{
- char **args;
+ const char **args;
const char *p, *q;
if (!first_time)
obstack_grow (&collect_obstack, " ", 1);