[Bug c++/60829] New: Illegal access to private base of public base granted.

arm.nahm at gmx dot de gcc-bugzilla@gcc.gnu.org
Sat Apr 12 00:25:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60829

            Bug ID: 60829
           Summary: Illegal access to private base of public base granted.
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: arm.nahm at gmx dot de

struct A{};
class B: A {};
struct C: A {};
struct D: B, C {
    D() { B::a = 0; }
};

The above code compiles in g++, even though the standard does not allow D
access to any member of the private base class A of public base class B.



More information about the Gcc-bugs mailing list