public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9122: qualified name forced to be used in non-public derived class
@ 2003-01-02  4:56 hou_zhenyu
  0 siblings, 0 replies; 2+ messages in thread
From: hou_zhenyu @ 2003-01-02  4:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9122
>Category:       c++
>Synopsis:       qualified name forced to be used in non-public derived class
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 01 20:56:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     hou_zhenyu@hotmail.com
>Release:        unknown-1.0
>Organization:
>Environment:
Win2k + mingw2.0(gcc3.2, and rc2 of gcc3.2.1);
Redhad Linux 8.0 + gcc3.2
>Description:
If a class inhereit from another class which further non-publicly inherit yet another third class. Any member or parameters that use not full qualified name of the third class will fail to compile.

"`class XXX' is inaccessible"
in which XXX is the name of the third class.

gcc 2.95-3 does not has this problem.
>How-To-Repeat:
// test.cpp, compile with "g++ -c test.cpp"
class A {};

class B : A {};

class C : public B {
public:
	A* p; // compiler report : `class A' is inaccessible
};
>Fix:
// test.cpp
class A {};

class B : A {};

class C : public B {
public:
	::A* p; // full qualified, ok
};
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/9122: qualified name forced to be used in non-public derived class
@ 2003-01-02  5:00 neil
  0 siblings, 0 replies; 2+ messages in thread
From: neil @ 2003-01-02  5:00 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, hou_zhenyu, nobody

Synopsis: qualified name forced to be used in non-public derived class

State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Wed Jan  1 21:00:08 2003
State-Changed-Why:
    Not a bug.  You're using private inheritance.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9122


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-02  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-02  4:56 c++/9122: qualified name forced to be used in non-public derived class hou_zhenyu
2003-01-02  5:00 neil

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).