http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29040
Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|gcc-bugs at gcc dot gnu.org | Known to fail| | --- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> --- To be clear: the issue isn't access control of subclasses per se: the real issue is about access control for 'struct n' vs 'n' when the declaration of p is parsed: 'struct n' is handled like 'struct whatever', is accepted without even performing a lookup. Indeed, changing 'struct n' to 'n' per normal C++ for this kind of code, leads to the expected error message. I think that accepting 'struct n' without lookup and thus without access control in this kind of code used to be legal in cfront.