This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Java PATCH for PR gcj/1200
- To: Joerg Brunsmann <joerg_brunsmann at yahoo dot de>
- Subject: Re: Java PATCH for PR gcj/1200
- From: Tom Tromey <tromey at redhat dot com>
- Date: 06 Apr 2001 11:00:36 -0600
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20010406093953.62364.qmail@web5407.mail.yahoo.com>
- Reply-To: tromey at redhat dot com
>>>>> "Joerg" == Joerg Brunsmann <joerg_brunsmann@yahoo.de> writes:
Joerg> the attached patch fixes PR gcj/1200 for this test case:
Do you have paperwork filed with the FSF?
We'll need that before we can check this in.
Joerg> 2001-04-06 Joerg Brunsmann <joerg_brunsmann@yahoo.de>
Joerg> * gjavah.c (is_throwable_subclass): New function.
Joerg> (decode_signature_piece): Use it.
Joerg> Fixes PR gcj/1200.
This patch largely looks ok. However there are a few small problems
with it.
Joerg> + for (;;) {
The open brace needs to be on its own line.
Joerg> +
Joerg> + }
Joerg> +
Joerg> +}
The two blanks lines here can be removed.
Joerg> @@ -1083,8 +1193,7 @@ decode_signature_piece (stream, signatur
Joerg> else if (! strncmp (signature, "Ljava/lang/Class;",
Joerg> sizeof ("Ljava/lang/Class;") - 1))
Joerg> ctype = "jclass";
Joerg> - else if (! strncmp (signature, "Ljava/lang/Throwable;",
Joerg> - sizeof ("Ljava/lang/Throwable;") - 1))
Joerg> + else if (is_throwable_subclass (signature))
Joerg> ctype = "jthrowable";
Joerg> else if (! strncmp (signature, "Ljava/lang/ref/WeakReference;",
Joerg> sizeof ("Ljava/lang/ref/WeakReference;") - 1))
Just above this code is a FIXME comment which this patch invalidates.
Please remove that comment.
Also, your new code allocates memory in is_throwable_subclass() but
never frees it. Anything allocated with ALLOC must be freed. Also
you must call JCF_FINISH (&jcf) each time through the loop.
Could you make these changes and resubmit?
Thanks for this patch!
Tom