[Bug c++/11986] New: forward declaration error
kemin dot zhou at ferring dot com
gcc-bugzilla@gcc.gnu.org
Tue Aug 19 22:09:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11986
Summary: forward declaration error
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: critical
Priority: P1
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kemin dot zhou at ferring dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux
GCC host triplet: i686-pc-linux
GCC target triplet: i686-pc-linux
when two classes have inter dependency, compiler could not compile.
The exact same code can be compiled with no problem with gcc3.2.2
After upgrading to gcc3.3.1, the same code would not compile:
the basic class lay out is like this:
class B; // the forward declaration, stopped working in 3.3.1
class A {
vector<B> bvec;
};
class B {
public:
void method(A& a);
private:
int someMembers;
};
More information about the Gcc-bugs
mailing list