public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [gcjx] Patch: FYI: minor compiler assertion fix
@ 2005-10-04 21:50 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2005-10-04 21:50 UTC (permalink / raw)
  To: Java Patch List

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-04 21:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-04 21:50 [gcjx] Patch: FYI: minor compiler assertion fix Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).