From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6988 invoked by alias); 23 Aug 2014 14:27:11 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6974 invoked by uid 48); 23 Aug 2014 14:27:08 -0000 From: "rohan at rohanlean dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/62240] New: A using-declaration within a class can publish a public base of a private base. Date: Sat, 23 Aug 2014 14:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: rohan at rohanlean dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg01591.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62240 Bug ID: 62240 Summary: A using-declaration within a class can publish a public base of a private base. Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rohan at rohanlean dot de Created attachment 33384 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33384&action=edit small testcase Suppose that three classes are related by inheritance (B ---> A : B inherits from A) as follows: C ---private--> B ---public--> A Then C can publish A via using B::A; I think that the correct behaviour is to reject such a program.