This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bug using gcc 2.95.2


/*
   The following code compiles with gcc 2.95.2 but should not according to
the C++
   standard as I understand it.  VC++ appears to generate the correct
behavior and
   produces a compile error.
*/
class A {
public:
    int x;
};

class B : public A {
public:
protected:
    A::x;
};

void main(void) {
    B b;
    b.x = 7;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]