public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67395] New: It is possible to override c++ access control in case of indirect inheritance
@ 2015-08-29 19:39 webczat_200 at poczta dot onet.pl
  0 siblings, 0 replies; only message in thread
From: webczat_200 at poczta dot onet.pl @ 2015-08-29 19:39 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-29 19:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-29 19:39 [Bug c++/67395] New: It is possible to override c++ access control in case of indirect inheritance webczat_200 at poczta dot onet.pl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).