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]
Other format: [Raw text]

Class.h and Class.java both define zero-arg constructor



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


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