This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: fixlet in Signature generation
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 21 Dec 2005 10:08:46 -0700
- Subject: [gcjx] Patch: FYI: fixlet in Signature generation
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
It is incorrect to generate an empty Signature attribute. This
happens for Object.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* bytecode/classwriter.cc (write): Special-case empty signature.
Index: bytecode/classwriter.cc
===================================================================
--- bytecode/classwriter.cc (revision 108417)
+++ bytecode/classwriter.cc (working copy)
@@ -221,8 +221,13 @@
class_attributes.push_back (new simple_name_attribute (pool,
"Deprecated"));
if (target_15)
- class_attributes.push_back (new utf8_attribute (pool, "Signature",
- the_class->get_class_signature ()));
+ {
+ std::string sig = the_class->get_class_signature ();
+ // For Object this will be the empty string.
+ if (sig != "")
+ class_attributes.push_back (new utf8_attribute (pool, "Signature",
+ sig));
+ }
if (global->get_compiler ()->target_debug ())
{