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

Jeff Sturm jsturm@one-point.com
Mon Dec 10 20:41:00 GMT 2001



On Tue, 11 Dec 2001, Bryce McKinlay wrote:
> Weird. I don't think there should be a definition in natClass.o:
> 
> $ nm Class.o | c++filt | grep Class::Class
> 000004b0 T java::lang::Class::Class()
> $ nm natClass.o | c++filt | grep Class::Class
> 00000000 W java::lang::Class::Class()
> 00000000 W java::lang::Class::Class()
           ^
Mingw doesn't have weak symbols.

This should be inlined, but g++ still wants to generate a method body.
I'd guess this is needed to prevent link errors in case other program
units are compiled with inlining turned off.

Jeff



More information about the Java mailing list