diff options
author | Alexandre Petit-Bianco <apbianco@redhat.com> | 2001-08-24 10:40:54 -0700 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 2001-08-24 10:40:54 -0700 |
commit | 496849ba9adf83390849c27eb83d556c5d403cb6 (patch) | |
tree | d9bf3f14985d225ac1ec275d43787ee9713b21b1 /gcc/java/jcf-parse.c | |
parent | f2c333a19db8f4a917ad0a64ef4bd818a8865d89 (diff) | |
download | gcc-496849ba9adf83390849c27eb83d556c5d403cb6.zip gcc-496849ba9adf83390849c27eb83d556c5d403cb6.tar.gz gcc-496849ba9adf83390849c27eb83d556c5d403cb6.tar.bz2 |
jcf-parse.c (yyparse): Set magic to 0, don't issue error for a file smaller than 4 bytes.
2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
* jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
file smaller than 4 bytes.
* parse.y (check_inner_circular_reference): New function.
(check_circular_reference): Likewise.
(array_initializer:): Accept {,}.
(java_check_circular_reference): Rewritten using
check_circular_reference and check_inner_circular_reference.
(java_complete_expand_method): Unconditionally save and restore
the unpurged exception list.
(build_dot_class_method_invocation): Unmangle signature parameter.
(http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01417.html)
From-SVN: r45156
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r-- | gcc/java/jcf-parse.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index e258167..b52f1c1 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -1088,7 +1088,7 @@ yyparse () for (node = current_file_list; node; node = TREE_CHAIN (node)) { unsigned char magic_string[4]; - uint32 magic; + uint32 magic = 0; tree name = TREE_VALUE (node); /* Skip already parsed files */ @@ -1110,11 +1110,11 @@ yyparse () input_filename = IDENTIFIER_POINTER (name); /* Figure what kind of file we're dealing with */ - if (fread (magic_string, 1, 4, finput) != 4) - fatal_io_error ("Premature end of input file %s", - IDENTIFIER_POINTER (name)); - fseek (finput, 0L, SEEK_SET); - magic = GET_u4 (magic_string); + if (fread (magic_string, 1, 4, finput) == 4) + { + fseek (finput, 0L, SEEK_SET); + magic = GET_u4 (magic_string); + } if (magic == 0xcafebabe) { CLASS_FILE_P (node) = 1; |