public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "webczat_200 at poczta dot onet.pl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/67395] New: It is possible to override c++ access control in case of indirect inheritance
Date: Sat, 29 Aug 2015 19:39:00 -0000	[thread overview]
Message-ID: <bug-67395-4@http.gcc.gnu.org/bugzilla/> (raw)

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.


                 reply	other threads:[~2015-08-29 19:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-67395-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).