[gcjx] Patch: FYI: another static import fix

Tom Tromey tromey@redhat.com
Wed Oct 26 08:30:00 GMT 2005


I'm checking this in on the gcjx branch.

This fixes a crash in the static import code.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* compiler.cc (do_analyze_unit): Catch exceptions from
	check_imports.

Index: compiler.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/Attic/compiler.cc,v
retrieving revision 1.1.2.8
diff -u -r1.1.2.8 compiler.cc
--- compiler.cc 13 Oct 2005 04:01:11 -0000 1.1.2.8
+++ compiler.cc 26 Oct 2005 08:29:52 -0000
@@ -651,7 +651,16 @@
 	}
     }
 
-  unit->check_imports ();
+  try
+    {
+      unit->check_imports ();
+    }
+  catch (exception_base &exc)
+    {
+      exc.set_lexer (unit->get_lexer ());
+      std::cerr << exc;
+      ok = false;
+    }
 
   // Dump the AST to stdout now if it was requested.
   if (dump_tree ())



More information about the Java-patches mailing list