This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67395] New: It is possible to override c++ access control in case of indirect inheritance
- From: "webczat_200 at poczta dot onet.pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 29 Aug 2015 19:39:12 +0000
- Subject: [Bug c++/67395] New: It is possible to override c++ access control in case of indirect inheritance
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67395
Bug ID: 67395
Summary: It is possible to override c++ access control in case
of indirect inheritance
Product: gcc
Version: 5.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: webczat_200 at poczta dot onet.pl
Target Milestone: ---
Created attachment 36269
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36269&action=edit
test case
It seems that g++ does have an access control bug.
In case of multiple inheritance, where one base class appears multiple times in
a hierarchy, once inherited as a private, once as a public member, it is
possible to override this.
That is quite difficult to explain, I am attaching a test case that g++ does
compile, clang fails on that. I didn't check the standard itself, so it is
possible that it is not a bug, but for me it seems unlikely.