public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/8033: compile error when calling base class protected constructor from derived class function
@ 2002-09-30 10:10 nathan
0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-09-30 10:10 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, swoh
Synopsis: compile error when calling base class protected constructor from derived class function
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Mon Sep 30 10:10:22 2002
State-Changed-Why:
not a bug. derived only has access to protected base members
of the 'this' object. [11.2]/4 && [11.5]
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8033
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/8033: compile error when calling base class protected constructor from derived class function
@ 2002-09-25 4:36 swoh
0 siblings, 0 replies; 2+ messages in thread
From: swoh @ 2002-09-25 4:36 UTC (permalink / raw)
To: gcc-gnats
>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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-09-30 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-30 10:10 c++/8033: compile error when calling base class protected constructor from derived class function nathan
-- strict thread matches above, loose matches on Subject: below --
2002-09-25 4:36 swoh
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).