This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: keep going on error
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 02 Dec 2005 14:28:25 -0700
- Subject: [gcjx] Patch: FYI: keep going on error
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This lets the compiler keep going even if there is an error.
In particular it will analyze other classes.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* compiler.cc (semantic_analysis): Keep going on failure.
(do_analyze_unit): Likewise.
Index: compiler.cc
===================================================================
--- compiler.cc (revision 107604)
+++ compiler.cc (working copy)
@@ -300,7 +300,7 @@
need_class_method_bodies = false;
for (std::list<ref_unit>::const_iterator i = code_generation_units.begin ();
- ok && i != code_generation_units.end ();
+ i != code_generation_units.end ();
++i)
// Note that we do this single-threaded, as we don't have support
// for MT semantic analysis.
@@ -626,10 +626,9 @@
std::cout << " [analyzing " << unit->get_file_name () << "]"
<< std::endl;
- // fixme is this inefficient? look up the idiom
std::list<ref_class> types = unit->get_types ();
for (std::list<ref_class>::const_iterator j = types.begin ();
- ok && j != types.end ();
+ j != types.end ();
++j)
{
try
@@ -648,7 +647,7 @@
{
exc.set_lexer (unit->get_lexer ());
std::cerr << exc;
- ok = false;
+ break;
}
}