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++/11867] [3.3/3.4 Regression] static_cast ignores ambiguity


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
}
---------


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