This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
C++: current 2.96 now too strict at access control
- To: gcc-bugs <gcc-bugs at gcc dot gnu dot org>
- Subject: C++: current 2.96 now too strict at access control
- From: Alfred Minarik <a8601248 at unet dot univie dot ac dot at>
- Date: Thu, 24 Feb 2000 07:13:32 +0100
Things possible for global functions should
not be impossible for any member function.
Here is the example for the regression:
------
struct A {};
struct B : private A {};
struct C : B {
void f()
{
C c;
A a; //should pass
A* ap = (A*) &c; //should pass
}
};
------
with gcc version 2.96 20000223 (experimental)
this gives:
> g++ bug.cpp
bug.cpp: In method `void C::f ()':
bug.cpp:1: `struct A' is inaccessible
bug.cpp:9: within this context
bug.cpp:1: `struct A' is inaccessible
bug.cpp:10: within this context
bug.cpp:1: `struct A' is inaccessible
bug.cpp:10: within this context
Alfred