public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: swoh@paradise.net.nz To: gcc-gnats@gcc.gnu.org Subject: c++/8033: compile error when calling base class protected constructor from derived class function Date: Wed, 25 Sep 2002 04:36:00 -0000 [thread overview] Message-ID: <20020925113459.27386.qmail@sources.redhat.com> (raw) >Number: 8033 >Category: c++ >Synopsis: compile error when calling base class protected constructor from derived class function >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed Sep 25 04:36:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: ori hecht >Release: 2.95.3-5 (cygwin special) >Organization: >Environment: cygwin on win2000 >Description: The compiler refuses to call a protected constructor of a base class from a member function of a class derived from it. The compiler output is: tst.c: In method 'class B * Derived::bad()': tst.c:10: 'Base::Base(int)' is protected tst.c:21: within this context NOTE: how can I attach both the .c file and the .ii file through the GNATS interface? The selector allows me only one choice. >How-To-Repeat: g++ tst.c >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="tst.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="tst.c" DQoNCmNsYXNzIEJhc2Ugew0KICBwdWJsaWM6DQogICAgdmlydHVhbCB+QmFzZSgpIHt9DQoNCiAg ICBCYXNlKiBiYWRCKHZvaWQpIHtyZXR1cm4gbmV3IEJhc2UoNSk7fQ0KDQogIHByb3RlY3RlZDoN CiAgICBCYXNlKGludCkge30NCg0KICAgIGludCBnKGludCkge3JldHVybiA1O30NCn07DQoNCg0K Y2xhc3MgRGVyaXZlZDogcHVibGljIEJhc2Ugew0KICBwdWJsaWM6DQogICAgRGVyaXZlZCh2b2lk KTogQmFzZSgzKSB7fQ0KICAgIHZpcnR1YWwgfkRlcml2ZWQoKSB7fQ0KDQogICAgQmFzZSogYmFk RCh2b2lkKSB7cmV0dXJuIG5ldyBCYXNlKDUpO30NCiAgICBpbnQgZ29vZCh2b2lkKSB7cmV0dXJu IGcoNyk7fQ0KfTsNCg0KaW50IG1haW4oKQ0Kew0KICByZXR1cm4gMTsNCn0NCg0K
next reply other threads:[~2002-09-25 11:36 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-09-25 4:36 swoh [this message] 2002-09-30 10:10 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=20020925113459.27386.qmail@sources.redhat.com \ --to=swoh@paradise.net.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: linkBe 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).