Build failure with the 0.98 merge

Andrew Haley aph@redhat.com
Thu Aug 21 09:31:00 GMT 2008


Andrew John Hughes wrote:
> Hi all,
> 
> I'm getting a build error when trying to compile the version of GCJ
> merged with Classpath 0.98:

Is this when building gcc itself, or a local merge, i.e. can I look
at this for myself?

> In file included from
> /home/andrew/projects/classpath/gcj/sources/gcc/libjava/interpret.cc:25:
> /home/andrew/projects/classpath/gcj/sources/gcc/libjava/java/lang/StringBuffer.h:97:
> error: 'java::lang::AbstractStringBuffer*
> java::lang::StringBuffer::StringBuffer$append(jchar)' cannot be
> overloaded
> /home/andrew/projects/classpath/gcj/sources/gcc/libjava/java/lang/StringBuffer.h:38:
> error: with 'virtual java::lang::StringBuffer*
> java::lang::StringBuffer::StringBuffer$append(jchar)'
> /home/andrew/projects/classpath/gcj/sources/gcc/libjava/java/lang/StringBuffer.h:100:
> error: 'java::lang::AbstractStringBuffer*
> java::lang::StringBuffer::StringBuffer$append(java::lang::CharSequence*,
> jint, jint)' cannot be overloaded
> /home/andrew/projects/classpath/gcj/sources/gcc/libjava/java/lang/StringBuffer.h:36:
> error: with 'java::lang::StringBuffer*
> java::lang::StringBuffer::StringBuffer$append(java::lang::CharSequence*,
> jint, jint)'
> /home/andrew/projects/classpath/gcj/sources/gcc/libjava/java/lang/StringBuffer.h:102:
> error: 'java::lang::AbstractStringBuffer*
> java::lang::StringBuffer::StringBuffer$append(java::lang::CharSequence*)'
> cannot be overloaded
> /home/andrew/projects/classpath/gcj/sources/gcc/libjava/java/lang/StringBuffer.h:35:
> error: with 'java::lang::StringBuffer*
> java::lang::StringBuffer::StringBuffer$append(java::lang::CharSequence*)'
> make[3]: *** [interpret.lo] Error 1
> 
> Is there an issue with gcj and the use of covariant return types from 1.5?
> 
> The methods in question are StringBuffer.append(char),
> StringBuffer.append(CharSequence,int,int) and
> StringBuffer.append(CharSequence). All return a StirngBuffer and
> override methods with the same signature but a return type of
> AbstractStringBuffer in AbstractStringBuffer.
> 
> Cheers,



More information about the Java mailing list