This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11867] [3.3/3.4 Regression] static_cast ignores ambiguity
- From: "alfred dot minarik dot 1 at aon dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Sep 2003 10:28:44 -0000
- Subject: [Bug c++/11867] [3.3/3.4 Regression] static_cast ignores ambiguity
- References: <20030809122531.11867.alfred.minarik.1@aon.at>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11867
------- Additional Comments From alfred dot minarik dot 1 at aon dot at 2003-09-07 10:28 -------
Thanks for fixing this.
And also for adding the accessibility check.
I did not report it, as I was not 100% sure about.
e.g. Comeau online test pass this without error:
(g++ now rejects it as I would have expected.)
-------
struct A {};
struct B : private A {};
int
main ()
{
B b;
A* ap = (A*) &b;
B* bp = static_cast<B*> (ap); //Error
}
---------