[Bug c++/16147] dynamic_cast fails to enforce accesssibility
gdr at integrable-solutions dot net
gcc-bugzilla@gcc.gnu.org
Sun Aug 29 20:22:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list