This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: how do I stop gcjh from generating function bodies?


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]