public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [gcjx] Patch: FYI: fixlet in Signature generation
@ 2005-12-21 17:14 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2005-12-21 17:14 UTC (permalink / raw)
  To: Java Patch List

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 ())
     {

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

only message in thread, other threads:[~2005-12-21 17:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-21 17:14 [gcjx] Patch: FYI: fixlet in Signature generation 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).