This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Multiple method definition errors building GCJ 3.3
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Ranjit Mathew <rmathew at hotmail dot com>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 19 Dec 2002 17:46:32 -0500 (EST)
- Subject: Re: Multiple method definition errors building GCJ 3.3
On Thu, 19 Dec 2002, Ranjit Mathew wrote:
> Trying to figure out the cause of this error, I noticed that they
> were being thrown for methods that were defined inline in gcjh
> generated headers like "java/lang/String.h", etc. I don't know
> C++ properly, but it seems that these methods are not being
> inlined for some reason even though almost all of them are
> trivial "return foo;" type methods.
I didn't see a reply to this...
> Should gcjh explicitly mark them "inline"?
Perhaps. You want the method body to be expanded once, somehow. (My C++
is rusty and not getting any better these days.)
> Why doesn't this problem come up on other platforms?
GNU/Linux emits these methods with weak symbols. Win32 doesn't support
weak symbols. That could be the reason.
Jeff