[PATCH] Fix C++ friend usage in libjava
Kriang Lerdsuwanakij
lerdsuwa@users.sourceforge.net
Mon Oct 25 10:38:00 GMT 2004
Hi
While I work on making C++ friend class behavior standard-conformance,
I discover some problems in libjava friend usage inside class
'java::lang::Class', for example, in the declaration
'friend class _Jv_ClassReader;'. The referred '_Jv_ClassReader' should
be in 'java::lang' namespace but the current g++ treats it as in
the global namespace.
This is fixed by specifying the global namespace explicitly as the
'_Jv_ClassReader' and other classes are actually in the global namespace.
This works with both current g++ and the upcoming one with correct
friend behavior.
(Note that the friend function here will need to be fixed eventually but
now g++ still has problem using friend functions from a different
namespace.)
Tested on i686-pc-linux-gnu. OK for the mainline?
--Kriang
2004-10-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* libjava/java/lang/Class.h
(java::lang::Class): Correct friend class declaration.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff-java-friend
Type: application/x-java-vm
Size: 1574 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20041025/c8f54825/attachment.bin>
More information about the Java-patches
mailing list