This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Build failure with the 0.98 merge
- From: Tom Tromey <tromey at redhat dot com>
- To: "Andrew John Hughes" <gnu_andrew at member dot fsf dot org>
- Cc: java <java at gcc dot gnu dot org>
- Date: Thu, 21 Aug 2008 11:46:44 -0600
- Subject: Re: Build failure with the 0.98 merge
- References: <17c6771e0808201352p69c0264dm5afd1dabec872992@mail.gmail.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Andrew" == Andrew John Hughes <gnu_andrew@member.fsf.org> writes:
Andrew> /home/andrew/projects/classpath/gcj/sources/gcc/libjava/java/lang/StringBuffer.h:97:
Andrew> error: 'java::lang::AbstractStringBuffer*
Andrew> java::lang::StringBuffer::StringBuffer$append(jchar)' cannot be
Andrew> overloaded
Andrew> /home/andrew/projects/classpath/gcj/sources/gcc/libjava/java/lang/StringBuffer.h:38:
Andrew> Is there an issue with gcj and the use of covariant return
Andrew> types from 1.5?
There shouldn't be. javah has special code in it to rename bridge
method targets in this situation.
Looking at the header I see:
::java::lang::StringBuffer * StringBuffer$append(jchar);
::java::lang::Appendable * append(jchar);
::java::lang::AbstractStringBuffer * StringBuffer$append(jchar);
And looking at AbstractStringBuffer.h:
virtual ::java::lang::AbstractStringBuffer * AbstractStringBuffer$append(jchar);
virtual ::java::lang::Appendable * append(jchar);
So I think javah's bug is that it does not understand how bridge
methods might be inherited, and so it does not know rename targets
according to the class in the hierarchy where they first appeared.
IOW, that 3rd append method in StringBuffer.h should be named
AbstractStringBuffer$append.
Tom