This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11986] New: forward declaration error
- From: "kemin dot zhou at ferring dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2003 22:09:18 -0000
- Subject: [Bug c++/11986] New: forward declaration error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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;
};