This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: annotation assertion fix
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 01 Dec 2005 18:44:38 -0700
- Subject: [gcjx] Patch: FYI: annotation assertion fix
- Reply-to: tromey at redhat dot com
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)