diff options
| author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-03-06 08:35:49 +0000 |
|---|---|---|
| committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-03-06 08:35:49 +0000 |
| commit | 5ce13bce4c31cc84cc6952e360335c714250e2be (patch) | |
| tree | 486a4183689a6c011bf01289c6a0096cfcea6c5e /gcc/java/jcf-parse.c | |
| parent | e3f1d1d9cb6a3227e55fa8da93a4368789f28257 (diff) | |
| download | ppe42-gcc-5ce13bce4c31cc84cc6952e360335c714250e2be.tar.gz ppe42-gcc-5ce13bce4c31cc84cc6952e360335c714250e2be.zip | |
* Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
(parse-scan.o): Depend on toplev.h.
* class.c (make_method_value): Add prototype. Make it static.
Remove unused second argument, caller changed.
* expr.c (java_lang_expand_expr): Remove unused variable
`return_label'.
* java-tree.h: Don't prototype find_in_current_zip.
Add prototypes for verify_constant_pool, start_java_method,
end_java_method, give_name_to_locals, expand_byte_code,
open_in_zip, set_constant_value, find_constant1, find_constant2,
find_utf8_constant, find_string_constant, find_class_constant,
find_fieldref_index, find_methodref_index, write_constant_pool,
count_constant_pool_bytes and encode_newarray_type.
* jcf-dump.c: Remove unused variable `LONG_temp'.
* jcf-parse.c: Include parse.h.
(jcf_parse_source): Remove unused parameter, all callers changed.
(jcf_figure_file_type): Add static prototype.
(find_in_current_zip): Likewise. Also remove unused parameter,
all callers changed.
(read_class): Initialize variable `saved_pos'.
* jcf-reader.c (jcf_parse_preamble): Mark variables
`minor_version' and `major_version' with ATTRIBUTE_UNUSED.
* lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
(java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
(java_parse_doc_section): Initialize variable `seen_star'.
(java_lex): Wrap variable `number_beginning' in !JC1_LITE.
(java_lex_error): Mark parameters `msg' and `forward' with
ATTRIBUTE_UNUSED.
(java_get_line_col): Mark parameters `filename' and `line' with
ATTRIBUTE_UNUSED.
* parse-scan.y: Include toplev.h.
(yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
* parse.h: use `struct JCF', not plain `JCF'.
(java_parser_context_save_global, java_expand_classes
java_parser_context_restore_global, java_parse): Add prototypes.
* typeck.c (convert_ieee_real_to_integer): Remove unused variable
`node'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25616 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/jcf-parse.c')
| -rw-r--r-- | gcc/java/jcf-parse.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index ad0b80763d3..9b854b4442a 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -33,6 +33,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "input.h" #include "java-tree.h" #include "toplev.h" +#include "parse.h" /* A CONSTANT_Utf8 element is converted to an IDENTIFIER_NODE at parse time. */ #define JPOOL_UTF(JCF, INDEX) CPOOL_UTF(&(JCF)->cpool, INDEX) @@ -81,7 +82,9 @@ static tree give_name_to_class PROTO ((JCF *jcf, int index)); void parse_zip_file_entries PROTO (()); void process_zip_dir PROTO (()); static void parse_source_file PROTO ((tree)); -static void jcf_parse_source PROTO ((JCF *)); +static void jcf_parse_source PROTO ((void)); +static int jcf_figure_file_type PROTO ((JCF *)); +static int find_in_current_zip PROTO ((char *, struct JCF **)); /* Handle "SourceFile" attribute. */ @@ -465,15 +468,14 @@ read_class (name) tree save_current_class = current_class; char *save_input_filename = input_filename; JCF *save_current_jcf = current_jcf; - long saved_pos; + long saved_pos = 0; if (current_jcf->read_state) saved_pos = ftell (current_jcf->read_state); push_obstacks (&permanent_obstack, &permanent_obstack); /* Search in current zip first. */ - if (find_in_current_zip (IDENTIFIER_POINTER (name), - IDENTIFIER_LENGTH (name), &jcf) == 0) + if (find_in_current_zip (IDENTIFIER_POINTER (name), &jcf) == 0) /* FIXME: until the `.java' parser is fully working, we only look for a .java file when one was mentioned on the command line. This lets us test the .java parser fairly @@ -496,7 +498,7 @@ read_class (name) current_jcf = jcf; if (current_jcf->java_source) - jcf_parse_source (current_jcf); + jcf_parse_source (); else { java_parser_context_save_global (); java_push_parser_context (); @@ -560,9 +562,8 @@ load_class (class_or_name, verbose) /* Parse a source file when JCF refers to a source file. */ -void -jcf_parse_source (jcf) - JCF *jcf; +static void +jcf_parse_source () { tree file; @@ -956,7 +957,7 @@ void process_zip_dir() zip file. */ int DEFUN(find_in_current_zip, (name, length, jcf), - char *name AND int length AND JCF **jcf) + char *name AND JCF **jcf) { JCF *local_jcf; tree class_name = maybe_get_identifier (name), class, icv; @@ -979,7 +980,7 @@ DEFUN(find_in_current_zip, (name, length, jcf), } /* Figure what kind of file we're dealing with */ -int +static int DEFUN(jcf_figure_file_type, (jcf), JCF *jcf) { |

