This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Are private base classes really private ?
- To: egcs-bugs at cygnus dot com
- Subject: Are private base classes really private ?
- From: David C Binderman <dcb at pncl dot co dot uk>
- Date: Sun, 23 Aug 1998 10:04:12 +0100 (BST)
Hello there,
On Linux/ Alpha, with egcs-980816 -ansi -pedantic, no error was found for
the following code.
struct A { };
struct B : private A {};
B b;
A* pa = (A *) &b; // should fail here, according to 15.3.2 of Stroustrup 3.
Top of page 406 in my copy of Stroustrup 3.
Regards
David C Binderman MSc BSc +44 1293 534847 dcb@pncl.co.uk