diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-08 21:12:26 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-08 21:12:26 +0000 |
commit | 03bde6017ce5581fcb73761fa8c5210ee12631aa (patch) | |
tree | 6dbda9aef13aa04d7c15b46cb0bda16747482b8d /gcc/f | |
parent | 0d409008b0302a0de479fbe32900561a70bd37d5 (diff) | |
download | gcc-03bde6017ce5581fcb73761fa8c5210ee12631aa.tar.gz |
* c-common.h (c_common_init, c_common_post_options): Update.
* c-objc-common.c (c_objc_common_init): Update for new prototype.
* c-opts.c (saved_lineno): New.
(c_common_post_options, c_common_init): Update prototypes,
move call to cpp_read_main_file from latter to former.
* c-tree.h (c_ojbc_common_init): Update.
* langhooks-def.h (lhd_post_options): New.
(LANG_HOOKS_INIT, LANG_HOOKS_POST_OPTIONS): Update.
* langhooks.c (lhd_post_options): New.
* langhooks.h (struct lang_hooks): Update post_options and init hooks.
* toplev.c (no_backend): New.
(process_options): Call post_options hook and set main_input_filename
and input_filename here.
(lang_dependent_init, do_compile): post_options hook moved to
process_options.
* objc/objc-act.c (objc_init): Update prototype.
* objc/objc-act.h (objc_init): Update prototype.
ada:
* misc.c (gnat_init): Update for new prototype.
cp:
* cp-tree.h (cxx_init): Update prototype.
* lex.c (cxx_init): Similarly.
f:
* com.c (ffe_init): Update prototype; move code to ffe_post_options.
(ffe_post_options): New.
java:
* lang.c (java_init): Update prototype, move code to java_post_options.
(java_post_options): Similarly.
treelang:
* tree1.c (in_fname): Fix type.
(treelang_init): Update prototype and use of in_fname.
* treelang.h (in_fname): Fix type.
* treetree.c (tree_code_if_start, tree_code_if_else,
tree_code_if_end, tree_code_create_function_prototype,
tree_code_create_function_initial, tree_code_create_funciton_wrapup,
tree_code_create_variable, tree_code_output_expression_statement)
: Fix prototypes and use of filenames.
* treetree.h: Similarly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64001 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/f')
-rw-r--r-- | gcc/f/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/f/com.c | 27 |
2 files changed, 24 insertions, 8 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 9b087193feb..53216b83d08 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,8 @@ +Sat Mar 8 21:11:40 2003 Neil Booth <neil@daikokuya.co.uk> + + * com.c (ffe_init): Update prototype; move code to ffe_post_options. + (ffe_post_options): New. + 2003-03-04 Tom Tromey <tromey@redhat.com> * Make-lang.in (f77.tags): New target. diff --git a/gcc/f/com.c b/gcc/f/com.c index 4598b4ff94e..9c71841c543 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -14030,8 +14030,9 @@ insert_block (tree block) } /* Each front end provides its own. */ -static const char *ffe_init PARAMS ((const char *)); +static bool ffe_init PARAMS ((void)); static void ffe_finish PARAMS ((void)); +static bool ffe_post_options PARAMS ((const char **)); static void ffe_init_options PARAMS ((void)); static void ffe_print_identifier PARAMS ((FILE *, tree, int)); @@ -14050,6 +14051,8 @@ struct language_function GTY(()) #define LANG_HOOKS_INIT_OPTIONS ffe_init_options #undef LANG_HOOKS_DECODE_OPTION #define LANG_HOOKS_DECODE_OPTION ffe_decode_option +#undef LANG_HOOKS_POST_OPTIONS +#define LANG_HOOKS_POST_OPTIONS ffe_post_options #undef LANG_HOOKS_PARSE_FILE #define LANG_HOOKS_PARSE_FILE ffe_parse_file #undef LANG_HOOKS_MARK_ADDRESSABLE @@ -14115,9 +14118,12 @@ const char *const tree_code_name[] = { }; #undef DEFTREECODE -static const char * -ffe_init (const char *filename) +static bool +ffe_post_options (pfilename) + const char **pfilename; { + const char *filename = *pfilename; + /* Open input file. */ if (filename == 0 || !strcmp (filename, "-")) { @@ -14126,9 +14132,17 @@ ffe_init (const char *filename) } else finput = fopen (filename, "r"); + if (finput == 0) fatal_io_error ("can't open %s", filename); + return false; +} + + +static bool +ffe_init () +{ #ifdef IO_BUFFER_SIZE setvbuf (finput, (char *) xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE); #endif @@ -14144,11 +14158,8 @@ ffe_init (const char *filename) ffelex_hash_kludge (finput); /* FIXME: The ffelex_hash_kludge code needs to be cleaned up to - return the new file name. */ - if (main_input_filename) - filename = main_input_filename; - - return filename; + set the new file name. Maybe in ffe_post_options. */ + return true; } static void |