summaryrefslogtreecommitdiffstats
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-14 12:26:36 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-14 12:26:36 +0000
commit3272db82faf87eb82c5b56586dffb5b4b675501d (patch)
treec305de4bdbbe6e6f7807a99ebcbbb965f0549ad6 /gcc/toplev.c
parentd493b8a1d36cc7a1dd0a3541c0b2b5779efd4404 (diff)
downloadppe42-gcc-3272db82faf87eb82c5b56586dffb5b4b675501d.tar.gz
ppe42-gcc-3272db82faf87eb82c5b56586dffb5b4b675501d.zip
* Makefile.in: Update to use common.opt and lang_opt_files.
(c-options.c, c-options.h): Remove. (options.c, options.h): Add. * c-opts.c: Include options.h not c-options.h. * common.opt: New file. * configure, configure.in: Add lang_opt_files. * opts.c: Include flags.h and diagnostic.h. (common_handle_option): New. (handle_option): Update to recognize common options and all language-dependent options. * opts.h (CL_F77, CL_JAVA, CL_ADA, CL_COMMON, CL_TREELANG): New. (struct cl_option): Make flags of type int. * opts.h: Flag option with front ends to which it applies. Handle duplicate options. * toplev.c (filename): Remove. (independent_decode_option): Don't handle filenames and -quiet. (process_options, do_compile): Update. ada: * Make-lang.in: Update to use options.c and options.h. * misc.c: Include options.h not aoptions.h. (gnat_handle_option): Abort on unrecognized switch. (gnat_init_options): Request Ada switches. cp: * Make-lang.in: Remove c-options.o. f: * Make-lang.in: Update to use options.c and options.h. * top.c: Include options.h not f-options.h. (gnat_handle_option): Abort on unrecognized switch. (ffe_init_options): From com.c. Request F77 options. (ffe_handle_options): Abort on unrecognized switch. * com.c (ffe_init_options): Move to top.c. * top.h (fee_init_options): New. java: * Make-lang.in: Update to use options.c and options.h. * lang.c: Include options.h not j-options.h. (java_handle_option): Abort on unrecognized option. (java_init_options): Request Java switches. treelang: * Make-lang.in: Update to use options.c and options.h. * tree1.c: Include options.h not t-options.h. (treelang_init_options): New. (treelang_handle_option): Abort on unrecognized switch. * treetree.c (LANG_HOOKS_INIT_OPTIONS): Override. * treetree.h (treelang_init_options): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67941 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 85157e7bb0d..f349f73f5f1 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -359,7 +359,6 @@ static void close_dump_file (enum dump_file_index,
int rtl_dump_and_exit;
int flag_print_asm_name;
static int version_flag;
-static const char *filename;
enum graph_dump_types graph_dump_format;
/* Name for output file of assembly code, specified with -o. */
@@ -4594,14 +4593,7 @@ independent_decode_option (int argc, char **argv)
char *arg = argv[0];
if (arg[0] != '-' || arg[1] == 0)
- {
- if (arg[0] == '+')
- return 0;
-
- filename = arg;
-
- return 1;
- }
+ return 1;
arg++;
@@ -4705,13 +4697,6 @@ independent_decode_option (int argc, char **argv)
return 0;
break;
- case 'q':
- if (!strcmp (arg, "quiet"))
- quiet_flag = 1;
- else
- return 0;
- break;
-
case 'v':
if (!strcmp (arg, "version"))
version_flag = 1;
@@ -5385,8 +5370,8 @@ process_options (void)
initialization based on the command line options. This hook also
sets the original filename if appropriate (e.g. foo.i -> foo.c)
so we can correctly initialize debug output. */
- no_backend = (*lang_hooks.post_options) (&filename);
- main_input_filename = input_filename = filename;
+ no_backend = (*lang_hooks.post_options) (&main_input_filename);
+ input_filename = main_input_filename;
#ifdef OVERRIDE_OPTIONS
/* Some machines may reject certain combinations of options. */
@@ -5396,9 +5381,9 @@ process_options (void)
/* Set aux_base_name if not already set. */
if (aux_base_name)
;
- else if (filename)
+ else if (main_input_filename)
{
- char *name = xstrdup (lbasename (filename));
+ char *name = xstrdup (lbasename (main_input_filename));
strip_off_ending (name, strlen (name));
aux_base_name = name;
@@ -5738,7 +5723,7 @@ do_compile (void)
backend_init ();
/* Language-dependent initialization. Returns true on success. */
- if (lang_dependent_init (filename))
+ if (lang_dependent_init (main_input_filename))
compile_file ();
finalize ();
OpenPOWER on IntegriCloud