This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: C++ PATCH: PR 15815
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org, java at gcc dot gnu dot org
- Date: Tue, 08 Jun 2004 12:53:07 +0530
- Subject: Re: C++ PATCH: PR 15815
- References: <200406071924.i57JOvCf018313@sirius.codesourcery.com>
Mark Mitchell wrote:
> This patch deprecates "#pragma interface" and "#pragma implementation"
> as per PR 15815. I'll remove these before 3.5.0.
Hi Mark,
The warnings introduced by this patch cause these
failures in the libjava testsuite:
FAIL: natPR9577.cc compilation
FAIL: natlongfield.cc compilation
FAIL: natshortfield.cc compilation
To fix these, I tried to remove all instances of
"#pragma interface" and "#pragma implementation" from
GCJ and libjava.
However, this caused a link failure for libjava where
the linker is unable to find "_Jv_InitClass".
This function is declared 'extern "C"' in
"libjava/java/lang/Class.h" (and elsewhere, as needed).
The same header file defines this function as an "inline friend"
function. It had a "#pragma interface" (and
"libjava/java/lang/natClass.cc" had the corresponding
"#pragma implementation") that I was trying to remove.
So what's the best way out of this situation without
adversely impacting the performance? (_Jv_InitClass() is
heavily used all over the place.)
(FYI, I'm on Red Hat Enterprise Linux 3 Update 2, binutils
is 2.14.90.0.4 20030523.)
Thanks,
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/