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.

Reply via email to