public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: gthomas@hp5.g8labs.co.nz
To: gcc-gnats@gcc.gnu.org
Subject: c++/7309: Cannot create instances of privatly inherited grand-parent classes in a method of a class.
Date: Sun, 14 Jul 2002 23:26:00 -0000	[thread overview]
Message-ID: <200207150618.SAA03694@hp5.g8labs.co.nz> (raw)


>Number:         7309
>Category:       c++
>Synopsis:       Cannot create instances of privatly inherited grand-parent classes in a method of a class.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 14 23:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Gene.Thomas@eServGlobal.com
>Release:        3.0.4
>Organization:
>Environment:
System: HP-UX hp5 B.11.00 A 9000/785 2002388384 two-user license


	
host: hppa2.0w-hp-hpux11.00
build: hppa2.0w-hp-hpux11.00
target: hppa2.0w-hp-hpux11.00
configured with: ../gcc-3.0.4/configure --prefix=/opt/gcc-3.0.4 --enable-shared --with-gnu-as --with-as=/opt/binutils-2.11/bin/as --enable-languages=c,c++ --disable-libgcj
>Description:
	
>How-To-Repeat:
	
 class A {
 
 };
 
 class B : private A {
 public:
    void bf() {
       A a;                      // this is ok
   }
 };
 
 class C : public B {
 public:
    void cf() {
         A a;                    // `class A' is inaccessible COMPILE ERROR
    }
 };
 
 int main() {
     A a;                        // but this is ok
     return 0;
 }

Fix:

void cf() {
    ::A a;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-07-15  6:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-14 23:26 gthomas [this message]
2002-09-14  5:14 nathan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200207150618.SAA03694@hp5.g8labs.co.nz \
    --to=gthomas@hp5.g8labs.co.nz \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).