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.