c++/4911: private base class constructor inaccessible in unusual class hierarchy

post@volker-wysk.de post@volker-wysk.de
Thu Nov 8 07:35:00 GMT 2001


>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=



More information about the Gcc-bugs mailing list