diff options
author | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-28 23:40:21 +0000 |
---|---|---|
committer | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-28 23:40:21 +0000 |
commit | 648ef87b90f2c9cf4f62ca3698f5b9ef295b14e5 (patch) | |
tree | cfaef23a5b6e8fcba2ebb770074ebff39db32149 /gcc/java | |
parent | 6ee1791feeb4b8080daac0d21f9650e38e512b49 (diff) | |
download | gcc-648ef87b90f2c9cf4f62ca3698f5b9ef295b14e5.tar.gz |
2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
Fix for PR java/4715:
* jcf-parse.c (parse_source_file_3): New function.
(read_class): Call it.
(java_parse_file): Likewise.
(http://gcc.gnu.org/ml/gcc-patches/2002-03/msg01917.html)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51534 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/java/jcf-parse.c | 15 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index c1d3908a711..c1206c46c12 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,10 @@ +2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com> + + Fix for PR java/4715: + * jcf-parse.c (parse_source_file_3): New function. + (read_class): Call it. + (java_parse_file): Likewise. + Thu Mar 28 13:22:22 CET 2002 Jan Hubicka <jh@suse.cz> * java/lang.c (java_init_options): Set flag_trapping_math to 0. diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 00e8a4ff10a..53e647cb2c6 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -96,6 +96,7 @@ static void parse_zip_file_entries PARAMS ((void)); static void process_zip_dir PARAMS ((FILE *)); static void parse_source_file_1 PARAMS ((tree, FILE *)); static void parse_source_file_2 PARAMS ((void)); +static void parse_source_file_3 PARAMS ((void)); static void parse_class_file PARAMS ((void)); static void set_source_filename PARAMS ((JCF *, int)); static void ggc_mark_jcf PARAMS ((void**)); @@ -550,6 +551,7 @@ read_class (name) fatal_io_error ("can't reopen %s", input_filename); parse_source_file_1 (file, finput); parse_source_file_2 (); + parse_source_file_3 (); if (fclose (finput)) fatal_io_error ("can't close %s", input_filename); } @@ -883,6 +885,12 @@ parse_source_file_2 () int save_error_count = java_error_count; java_complete_class (); /* Parse unsatisfied class decl. */ java_parse_abort_on_error (); +} + +static void +parse_source_file_3 () +{ + int save_error_count = java_error_count; java_check_circular_reference (); /* Check on circular references */ java_parse_abort_on_error (); java_fix_constructors (); /* Fix the constructors */ @@ -1132,6 +1140,13 @@ java_parse_file () input_filename = ctxp->filename; parse_source_file_2 (); } + + for (ctxp = ctxp_for_generation; ctxp; ctxp = ctxp->next) + { + input_filename = ctxp->filename; + parse_source_file_3 (); + } + for (node = current_file_list; node; node = TREE_CHAIN (node)) { input_filename = IDENTIFIER_POINTER (TREE_VALUE (node)); |