This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: PR java/33765


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 *);

 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]