This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/4911: private base class constructor inaccessible in unusual class hierarchy
- From: post at volker-wysk dot de
- To: gcc-gnats at gcc dot gnu dot org
- Date: 19 Nov 2001 23:46:07 -0000
- Subject: c++/4911: private base class constructor inaccessible in unusual class hierarchy
- Reply-to: post at volker-wysk dot de
[Get raw message]
>Number: 4911
>Category: c++
>Synopsis: private base class constructor inaccessible in unusual class hierarchy
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 19 15:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Volker Wysk
>Release: gcc 3.0.2, gcc 2.95
>Organization:
>Environment:
Debian GNU/Linux 2.2r2, i386
>Description:
The attached program fails to compile.
/tmp $ gcc-3.0 x.C
x.C:10: warning: direct base `I' inaccessible in `C' due to ambiguity
x.C: In constructor `C::C()':
x.C:11: no matching function for call to `I::I()'
x.C:1: candidates are: I::I(const I&)
x.C:3: I::I(int)
I think both, the error and the warning, are wrong.
>How-To-Repeat:
gcc-3.0 x.C
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/msword; name="x.C"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="x.C"
c3RydWN0IEkgewogIGludCBpOwogIEkoaW50IGopIHsgaSA9IGo7IH07Cn07CgpzdHJ1Y3QgQiA6
IHByaXZhdGUgSSB7CiAgQihpbnQgeCkgOiBJKHgpIHt9Owp9OwoKc3RydWN0IEMgOiBwdWJsaWMg
QiwgcHJpdmF0ZSBJIHsKICBDKCkgOiBCKDEpLCBJKDIpIHt9Owp9Owo=