This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

[gcjx] Patch: FYI: minor compiler assertion fix


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


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