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: annotation assertion fix


I'm checking this in on the gcjx branch.

This fixes an assertion related to annotation processing.
Now the code is better prepared to find a bad class library.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* model/annotype.cc (element_compatible_p): Fixed assertion.

Index: model/annotype.cc
===================================================================
--- model/annotype.cc	(revision 107604)
+++ model/annotype.cc	(working copy)
@@ -169,10 +169,13 @@
 		bit = ANNOTATE_ANNOTATION;
 	      else if (name == "CONSTRUCTOR")
 		bit = ANNOTATE_CONSTRUCTOR;
+	      else if (name == "PACKAGE")
+		bit = ANNOTATE_PACKAGE;
 	      else
 		{
-		  assert (name == "PACKAGE");
-		  bit = ANNOTATE_PACKAGE;
+		  std::cerr << error ("unknown element type %1") % name;
+		  // Suppress further errors.
+		  bit = kind;
 		}
 
 	      if ((value & bit) != 0)


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