This is the mail archive of the gcc-bugs@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]

[Bug c++/52136] g++ is wrongly propagating "friend class" to the parent class


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52136

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-06 13:50:40 UTC ---
I think G++ is correct here.

[class.protected]p1
An additional access check beyond those described earlier in Clause 11 is
applied when a non-static data member or non-static member function is a
protected member of its naming class (11.2)*

* This additional check does not apply to other members, e.g., static data
members or enumerator member constants.


address::parseNext refers to the same entity as mailbox::parseNext and access
to static members does not involve an object expression, so there is no need
for that access to be done through an object expression of the derived type.


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