From mboxrd@z Thu Jan 1 00:00:00 1970 From: theonetruekenny@yahoo.com To: gcc-gnats@gcc.gnu.org Subject: c++/2306: access control lost for virtual bases Date: Fri, 16 Mar 2001 11:16:00 -0000 Message-id: <20010316190801.1028.qmail@sourceware.cygnus.com> X-SW-Source: 2001-03/msg00096.html List-Id: >Number: 2306 >Category: c++ >Synopsis: access control lost for virtual bases >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Fri Mar 16 11:16:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Kenny Simpson >Release: gcc version 3.0 20010316 (prerelease) >Organization: >Environment: online compiler >Description: GCC seems to forget the access controls for virtual bases. The current snapshot and 2.95.2 both allow the following example. Note that without the 'virtual' the code is rejected as it should be. >How-To-Repeat: struct B { void func(){} }; struct D : private virtual B {}; struct DD : public D { DD() : B(), // this should not be visible, but is D() { B::func(); // this also should not be visible, but is } }; >Fix: >Release-Note: >Audit-Trail: >Unformatted: