* [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)
! {
! &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
!
! &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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [HTML] Add new C++ access check rules to changes.html (PR 14949)
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-11 11:05 ` Vaclav Haisman
2 siblings, 0 replies; 9+ messages in thread
From: Jason Merrill @ 2004-06-10 15:38 UTC (permalink / raw)
To: Giovanni Bajo; +Cc: gcc-patches, Gerald Pfeifer
OK.
Jason
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [HTML] Add new C++ access check rules to changes.html (PR 14949)
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
2 siblings, 2 replies; 9+ messages in thread
From: Gerald Pfeifer @ 2004-06-10 15:47 UTC (permalink / raw)
To: Giovanni Bajo; +Cc: gcc-patches
On Thu, 10 Jun 2004, Giovanni Bajo wrote:
> Tested with the validator, OK to commit?
Jason already approved, but I'm wondering about one detail:
> Index: changes.html
> ===================================================================
> ! public:
> ! void pub_func(void);
> ! protected:
> ! void prot_func(void);
> ! private:
> ! void priv_func(void);
> ! };
> !
> ! class B : public A
> ! {
> ! public:
> ! void foo(void)
Do we really need all these "(void)"s instead of just "()"? Personally, I
prefer the latter.
Gerald
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [HTML] Add new C++ access check rules to changes.html (PR 14949)
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-11 11:05 ` Vaclav Haisman
2004-06-11 11:53 ` Paolo Bonzini
2004-06-11 13:36 ` Giovanni Bajo
2 siblings, 2 replies; 9+ messages in thread
From: Vaclav Haisman @ 2004-06-11 11:05 UTC (permalink / raw)
To: Giovanni Bajo; +Cc: gcc-patches
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [HTML] Add new C++ access check rules to changes.html (PR 14949)
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
1 sibling, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2004-06-11 11:53 UTC (permalink / raw)
To: Vaclav Haisman; +Cc: gcc-patches
>>! &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?
Yes, there is...
>>!
>>! &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
...and here as well ^^^^
Ciao,
Paolo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [HTML] Add new C++ access check rules to changes.html (PR 14949)
2004-06-11 11:53 ` Paolo Bonzini
@ 2004-06-11 12:59 ` Paolo Bonzini
0 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2004-06-11 12:59 UTC (permalink / raw)
To: gcc-patches; +Cc: 0
>>! &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?
Yes, there is...
>>!
>>! &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
...and here as well ^^^^
Ciao,
Paolo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [HTML] Add new C++ access check rules to changes.html (PR 14949)
2004-06-11 11:05 ` Vaclav Haisman
2004-06-11 11:53 ` Paolo Bonzini
@ 2004-06-11 13:36 ` Giovanni Bajo
1 sibling, 0 replies; 9+ messages in thread
From: Giovanni Bajo @ 2004-06-11 13:36 UTC (permalink / raw)
To: Vaclav Haisman; +Cc: gcc-patches
Vaclav Haisman wrote:
>> A ! &A::priv_func; // error, cannot access prot_func
>> through A
> I am no expert but isn't there a typo ---------------^^^^ here?
Good catch! Fixed, thanks.
Giovanni Bajo
^ 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).