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++/16147] dynamic_cast fails to enforce accesssibility


------- Additional Comments From gdr at integrable-solutions dot net  2004-08-29 20:22 -------
Subject: Re:  dynamic_cast fails to enforce accesssibility

"nathan at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| A need not be a public base of the most derived object.  (In this
| hierarchy) it needs to be a public base of a B object, which it is.
| Therefore the dynamic cast succeeds and the assert fails.
| [5.2.7]/8 first bullet. 'v' is the A base, 'T' is the B base.

I don't think that the first bullet saysthe dynamic cast should succeed.
The most derived object here is of type C, not B.

-- Gaby


-- 


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


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