[Bug c++/29040] New: missing access control checks in subclasses for nested types
amylaar at gcc dot gnu dot org
Tue Sep 12 20:03:00 GMT 2006
The following should not compile:
struct d:public c
void f (struct n *p);
According to 9.2 ; 1, nested types are class members. 11 ; 4 says that member
access control does not affect visibility, only access. If an inaccessible
member name is used, the program is ill-formed.
FWIW, g++ will also accept if you declare a data member of type struct n in d.
Summary: missing access control checks in subclasses for nested
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amylaar at gcc dot gnu dot org
More information about the Gcc-bugs