This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: how do I stop gcjh from generating function bodies?
- To: Adam Megacz <gcj at lists dot megacz dot com>
- Subject: Re: how do I stop gcjh from generating function bodies?
- From: Tom Tromey <tromey at redhat dot com>
- Date: 12 Nov 2001 09:47:56 -0700
- Cc: java at gcc dot gnu dot org
- References: <m3k7wwdz7o.fsf@noneofyourbusiness.com>
- Reply-to: tromey at redhat dot com
>>>>> "Adam" == Adam Megacz <gcj@lists.megacz.com> writes:
Adam> public class C implements I {
Adam> public I returnSelfAsI() { return this; }
Adam> }
Adam> ...but gcjh generates a body for it in the .h file, except that CNI
Adam> doesn't grok interfaces, so the generated .h doesn't compile (CNI
Adam> doesn't understand that it's okay to return a C when the declared
Adam> return type is an I).
Interesting -- this case never came up before.
This is a bug in gcjh.
One fix could be to have gcjh cast the return result.
Tom