This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix C++ friend usage in libjava


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.



Attachment: diff-java-friend
Description: application/java-vm


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]