This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Class.h and Class.java both define zero-arg constructor
- From: Adam Megacz <gcj at lists dot megacz dot com>
- To: java at gcc dot gnu dot org
- Date: 10 Dec 2001 20:45:46 -0500
- Subject: Class.h and Class.java both define zero-arg constructor
- Organization: Myself
Hrm,
Class.h:
// This constructor is used to create Class object for the primitive
// types. See prims.cc.
Class ()
{
// C++ ctors set the vtbl pointer to point at an offset inside the vtable
// object. That doesn't work for Java, so this hack adjusts it back.
((_Jv_Self *)this)->vtable_ptr -= 2 * sizeof (void *);
}
Class.java:
// Don't allow new classes to be made.
private Class ()
{
}
gcj:
/usr/local/cross-gcc/bin/../lib/gcc-lib/i686-pc-mingw32/3.1/../../../../i686-pc-mingw32/lib/libgcj.a(natClass.o): In function `Z17_Jv_GetArrayClassPN4java4lang5ClassEPNS0_11ClassLoaderE':
/home/megacz/cross-gcc/gcc-bin/i686-pc-mingw32/libjava/../../../gcc/libjava/java/lang/Class.h(.text$_ZN4java4lang5ClassC1Ev+0x0): multiple definition of `java::lang::Class::Class()'
/usr/local/cross-gcc/bin/../lib/gcc-lib/i686-pc-mingw32/3.1/../../../../i686-pc-mingw32/lib/libgcj.a(Class.o):/home/megacz/cross-gcc/gcc-bin/i686-pc-mingw32/libjava/../../../gcc/libjava/java/lang/Class.java:222: first defined here
For now I'm just commenting out the one in Class.java...
- a