c++/8672: Access to private bases denied
struppi@acm.org
struppi@acm.org
Thu Nov 21 09:26:00 GMT 2002
>Number: 8672
>Category: c++
>Synopsis: Access to private bases denied
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 21 08:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: struppi@acm.org
>Release: unknown-1.0
>Organization:
>Environment:
Debian woody 3.0 GNU-Linux, g++ 3.2
>Description:
g++ forbids access to private base classes illegally. Nothing should prevent class method O2::foo from declaring a pointer to L, like it is possible in global function ::bar. g++ seems to think that any use of private bases should be forbidden.
Error message is:
g++-3.2 -Wall -ansi -pedantic -c l.cc
l.cc: In member function `void O2::foo()':
l.cc:2: `struct L' is inaccessible
l.cc:16: within this context
>How-To-Repeat:
g++-3.2 -Wall -ansi -pedantic -E l.cc > l.E
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="l.E"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="l.E"
IyAxICJsLmNjIgojIDEgIjxidWlsdC1pbj4iCiMgMSAiPGNvbW1hbmQgbGluZT4iCiMgMSAibC5j
YyIKCnN0cnVjdCBMIHsKICBMICgpIHt9Cn07CgpzdHJ1Y3QgVCA6IHByaXZhdGUgTCB7CiAgVCgp
IHt9Cn07CgpzdHJ1Y3QgTzIgOiBwdWJsaWMgVCB7CiAgTzIoKSB7fQogIHZvaWQgZm9vKCk7Cn07
Cgp2b2lkIE8yOjpmb28oKSB7CiAgTCogbCBfX2F0dHJpYnV0ZV9fKCh1bnVzZWQpKTsKfQoKdm9p
ZCBiYXIoKSB7CiAgTCogbCBfX2F0dHJpYnV0ZV9fKCh1bnVzZWQpKTsKfQo=
More information about the Gcc-bugs
mailing list