[gcjx] Patch: FYI: minor compiler assertion fix
Tom Tromey
tromey@redhat.com
Tue Oct 4 21:50:00 GMT 2005
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
More information about the Java-patches
mailing list