This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: PR java/33765
- From: Tom Tromey <tromey at redhat dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: GCJ-patches <java-patches at gcc dot gnu dot org>
- Date: Fri, 02 Nov 2007 13:34:24 -0600
- Subject: Patch: FYI: PR java/33765
- Reply-to: Tom Tromey <tromey at redhat dot com>
I'm checking this in.
This fixes PR java/33765. The bug here is that compiling an empty
.java file ICEs. This patch changes it to do nothing.
Tom
ChangeLog:
2007-11-02 Tom Tromey <tromey@redhat.com>
PR java/33765:
* jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
* zipfile.h (ZIPEMPTYMAGIC): New define.
Index: jcf-parse.c
===================================================================
--- jcf-parse.c (revision 129850)
+++ jcf-parse.c (working copy)
@@ -1946,6 +1946,10 @@
#endif
parse_zip_file_entries ();
}
+ else if (magic == (JCF_u4) ZIPEMPTYMAGIC)
+ {
+ /* Ignore an empty input jar. */
+ }
else
{
gcc_unreachable ();
Index: zipfile.h
===================================================================
--- zipfile.h (revision 129850)
+++ zipfile.h (working copy)
@@ -58,6 +58,7 @@
#define ZIPDIR_NEXT(ZIPD) \
((ZipDirectory*)((char*)(ZIPD)+(ZIPD)->direntry_size))
#define ZIPMAGIC 0x504b0304
+#define ZIPEMPTYMAGIC 0x504b0506
extern ZipFile * opendir_in_zip (const char *, int);
extern int read_zip_archive (ZipFile *);