This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [HTML] Add new C++ access check rules to changes.html (PR 14949)
- From: Vaclav Haisman <V dot Haisman at sh dot cvut dot cz>
- To: Giovanni Bajo <giovannibajo at libero dot it>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 11 Jun 2004 09:32:41 +0200 (CEST)
- Subject: Re: [HTML] Add new C++ access check rules to changes.html (PR 14949)
- References: <239d01c44ee3$1d08b870$444e2a97@bagio>
On Thu, 10 Jun 2004, Giovanni Bajo wrote:
> Hello,
>
> this patch implements PR 14949, which is basically adding a brief documentation
> about the change introduced by the fix for PR 11174 (made by Kriang for GCC
> 3.4.0). Since a fair number of persons submitted an invalid bug about this, I
> think it is worth documenting it.
>
> Tested with the validator, OK to commit?
>
> Giovanni Bajo
>
>
> Index: changes.html
> ===================================================================
> RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-3.4/changes.html,v
> retrieving revision 1.116
> diff -c -3 -p -r1.116 changes.html
> *** changes.html 20 Apr 2004 18:39:01 -0000 1.116
> --- changes.html 10 Jun 2004 12:03:03 -0000
> ***************
> *** 574,582 ****
> foo(a1); // OK, a1 is a lvalue
> }</pre>
>
> ! This might be surprising at first sight, especially since most
> popular compilers do not correctly implement this rule
> ! (<a href="../bugs.html#cxx_rvalbind">further details</a>).</li>
> </ul>
>
> <h4>Runtime Library (libstdc++)</h4>
> --- 578,617 ----
> foo(a1); // OK, a1 is a lvalue
> }</pre>
>
> ! <p>This might be surprising at first sight, especially since most
> popular compilers do not correctly implement this rule
> ! (<a href="../bugs.html#cxx_rvalbind">further details</a>).</p></li>
> !
> ! <li>When forming a pointer to member or a pointer to member function,
> ! access checks for class visibility (public, protected, private)
> ! are now performed using the qualifying scope of the name itself.
> ! This is better explained with an example:
> !
> ! <pre>
> ! class A
> ! {
> ! public:
> ! void pub_func(void);
> ! protected:
> ! void prot_func(void);
> ! private:
> ! void priv_func(void);
> ! };
> !
> ! class B : public A
> ! {
> ! public:
> ! void foo(void)
> ! {
> ! &A::pub_func; // OK, pub_func is accessible through A
> ! &A::prot_func; // error, cannot access prot_func through A
> ! &A::priv_func; // error, cannot access prot_func through A
I am no expert but isn't there a typo ---------------^^^^ here?
> !
> ! &B::pub_func; // OK, pub_func is accessible through B
> ! &B::prot_func; // OK, can access prot_func through B (within B)
> ! &B::priv_func; // error, cannot access prot_func through B
> ! }
> ! };</pre></li>
> </ul>
>
> <h4>Runtime Library (libstdc++)</h4>
VH