This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[wwwdocs PATCH] Document friend changes in gcc-4.0/changes.html
- From: Kriang Lerdsuwanakij <lerdsuwa at users dot sourceforge dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 01 Dec 2004 22:32:57 +0700
- Subject: [wwwdocs PATCH] Document friend changes in gcc-4.0/changes.html
Hi
The attached patch add some entries in Changes for the upcoming
GCC 4.0 release. These summarize the changes I did to the
C++ frontend. All of them are friend-related features.
OK to commit?
--Kriang
diff -cprN wwwdocs-save/htdocs/gcc-4.0/changes.html wwwdocs-new/htdocs/gcc-4.0/changes.html
*** wwwdocs-save/htdocs/gcc-4.0/changes.html Tue Nov 30 07:37:45 2004
--- wwwdocs-new/htdocs/gcc-4.0/changes.html Tue Nov 30 22:42:10 2004
*************** register int bar;
*** 179,185 ****
*</code> could be overridden by a function returning
<code>T *</code>. This is now deprecated and will be removed in
a future release.</li>
! </ul>
<h3>Java</h3>
--- 179,218 ----
*</code> could be overridden by a function returning
<code>T *</code>. This is now deprecated and will be removed in
a future release.</li>
!
! <li>Declaration of nested classes of class templates as friends are
! supported:
! <pre>template <typename T> struct A {
! class B {};
! };
! class C {
! template <typename T> friend class A<T>::B;
! };</pre>
! This complements the feature member functions of class templates
! as friends introduced in GCC 3.4.0.</li>
!
! <li>Friend classes that are not qualified with their scope are no
! longer looked up outside the innermost non-class scope as given
! in the standard:
! <pre>class A;
! namespace N {
! class B {
! friend class A; // Refer to N::A which has not been declared yet
! // because name outside namespace N are not searched
! friend class ::A; // Refer to ::A
! };
! }</pre>
! Hiding the friend name until declaration is still not implemented.</li>
!
! <li>Friends of classes defined outside their namespace are correctly
! handled:
! <pre>namespace N {
! class A;
! }
! class N::A {
! friend class B; // Refer to N::B in GCC 4.0.0
! // but ::B in earlier versions of GCC
! };</pre></ul>
<h3>Java</h3>