public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29040] New: missing access control checks in subclasses for nested types
@ 2006-09-12 20:03 amylaar at gcc dot gnu dot org
2006-09-12 20:59 ` [Bug c++/29040] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-09-12 20:03 UTC (permalink / raw)
To: gcc-bugs
The following should not compile:
struct c
{
private:struct n
{
int j;
};
};
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
types
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amylaar at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29040
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/29040] missing access control checks in subclasses for nested types
2006-09-12 20:03 [Bug c++/29040] New: missing access control checks in subclasses for nested types amylaar at gcc dot gnu dot org
@ 2006-09-12 20:59 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-12 20:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-12 20:59 -------
Confirmed, not a regression.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |2.95.3 3.4.0 3.0.4 3.3.3
| |3.2.3 4.0.0 4.1.0 4.2.0
Last reconfirmed|0000-00-00 00:00:00 |2006-09-12 20:59:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29040
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-12 20:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-12 20:03 [Bug c++/29040] New: missing access control checks in subclasses for nested types amylaar at gcc dot gnu dot org
2006-09-12 20:59 ` [Bug c++/29040] " pinskia at gcc dot gnu dot org
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).