C++ PATCH: PR 15815

Ranjit Mathew rmathew@gmail.com
Tue Jun 8 07:25:00 GMT 2004


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/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /