Build failure with the 0.98 merge

"Andrew John Hughes" <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
Hi all,

I'm getting a build error when trying to compile the version of GCJ
merged with Classpath 0.98:

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,
-- 
Andrew :-)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.