This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bug using gcc 2.95.2
- To: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Subject: bug using gcc 2.95.2
- From: "Anderson, Todd A" <todd dot a dot anderson at intel dot com>
- Date: Mon, 6 Mar 2000 15:04:28 -0800
/*
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;
}