This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/587: incorrect making romb-hierarchy in c++
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/587: incorrect making romb-hierarchy in c++
- From: tomcat at 7ka dot mipt dot ru
- Date: 1 Oct 2000 13:01:39 -0000
- Reply-To: tomcat at 7ka dot mipt dot ru
- Resent-Cc: gcc-prs at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, jason at gcc dot gnu dot org
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, tomcat@7ka.mipt.ru
>Number: 587
>Category: c++
>Synopsis: incorrect making romb-hierarchy in c++
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Sun Oct 01 06:06:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Klochkov Roman
>Release: gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
i686
kernel 2.2.17
Linux Slackware 7.1
>Description:
>How-To-Repeat:
#include <iostream.h>
class A
{
public:
int x;
};
class B: public A
{
};
class C: public A
{
};
class D: public B, public C
{
};
void main()
{
D obj;
((B)obj).x=1;
cout << ((B)obj).x; // prints not 1
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: