This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/10509: Problems w/ casting to base classes of classes with multiple inheritance


>Number:         10509
>Category:       c++
>Synopsis:       Problems w/ casting to base classes of classes with multiple inheritance
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 26 19:16:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     bero at arklinux dot org
>Release:        gcc-3_3-branch as of 2003/04/26
>Organization:
>Environment:
Linux 2.4.21rc1, glibc 2.3.2
>Description:
The attached code outputs "bbb" instead of the expected "bbc". (c->foo() should return "c")
>How-To-Repeat:
Compile and run the attached code
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="gccbug.cxx"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gccbug.cxx"

I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgQQp7CnB1Ymxp
YzoKCXZpcnR1YWwgc3RyaW5nIHRlc3QoKSB7IHJldHVybiAiYSI7IH0KfTsKCmNsYXNzIEI6cHVi
bGljIEEKewpwdWJsaWM6Cgl2aXJ0dWFsIHN0cmluZyB0ZXN0KCkgeyByZXR1cm4gImIiOyB9Cn07
CgpjbGFzcyBDCnsKcHVibGljOgoJdmlydHVhbCBzdHJpbmcgZm9vKCkgeyBjZXJyIDw8ICJyZXR1
cm5pbmcgYyIgPDwgZW5kbDsgcmV0dXJuICJjIjsgfQp9OwoKY2xhc3MgRDpwdWJsaWMgQixDCnsK
fTsKCQkKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIgKiphcmd2KQp7CglEICpkPW5ldyBEKCk7Cglj
ZXJyIDw8IGQtPnRlc3QoKSA8PCBkLT5mb28oKSA8PCBlbmRsOwoJQSAqYT0oQSopbmV3IEQoKTsK
CUIgKmI9KEIqKWE7CglDICpjPShDKilhOwoJY2VyciA8PCBhLT50ZXN0KCkgPDwgYi0+dGVzdCgp
IDw8IGMtPmZvbygpIDw8IGVuZGw7Cn0K


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]