This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: minor compiler assertion fix
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 04 Oct 2005 15:44:40 -0600
- Subject: [gcjx] Patch: FYI: minor compiler assertion fix
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
It is ok not to compile anything at all. This changes the compiler
so that it does not assert in this case.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* compiler.cc (semantic_analysis): Updated assert.
Index: compiler.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/Attic/compiler.cc,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 compiler.cc
--- compiler.cc 3 Oct 2005 17:38:09 -0000 1.1.2.6
+++ compiler.cc 4 Oct 2005 21:47:33 -0000
@@ -287,7 +287,9 @@
bool
compiler::semantic_analysis ()
{
- assert (state == PARSING_FILES);
+ // Note that if no source files were parsed, the state won't be
+ // PARSING_FILES.
+ assert (state <= PARSING_FILES);
state = ANALYZING_CLASSES;
// After we're finished parsing things from the command line, there
// is no longer a reason for the class reader to keep method bodies