public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [HTML] Add new C++ access check rules to changes.html (PR 14949)
@ 2004-06-10 13:54 Giovanni Bajo
  2004-06-10 15:38 ` Jason Merrill
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Giovanni Bajo @ 2004-06-10 13:54 UTC (permalink / raw)
  To: gcc-patches; +Cc: Gerald Pfeifer

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)
!    {
!      &amp;A::pub_func;   // OK, pub_func is accessible through A
!      &amp;A::prot_func;  // error, cannot access prot_func through A
!      &amp;A::priv_func;  // error, cannot access prot_func through A
!
!      &amp;B::pub_func;   // OK, pub_func is accessible through B
!      &amp;B::prot_func;  // OK, can access prot_func through B (within B)
!      &amp;B::priv_func;  // error, cannot access prot_func through B
!    }
!  };</pre></li>
    </ul>

    <h4>Runtime Library (libstdc++)</h4>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-06-11 10:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-10 13:54 [HTML] Add new C++ access check rules to changes.html (PR 14949) Giovanni Bajo
2004-06-10 15:38 ` Jason Merrill
2004-06-10 15:47 ` Gerald Pfeifer
2004-06-10 17:06   ` Jason Merrill
2004-06-11  3:45   ` Giovanni Bajo
2004-06-11 11:05 ` Vaclav Haisman
2004-06-11 11:53   ` Paolo Bonzini
2004-06-11 12:59     ` Paolo Bonzini
2004-06-11 13:36   ` Giovanni Bajo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).