http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60347
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P3 Status|ASSIGNED |UNCONFIRMED Last reconfirmed|2014-02-26 00:00:00 | Assignee|jason at gcc dot gnu.org |unassigned at gcc dot gnu.org Ever confirmed|1 |0 --- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- markus@x4 html % cat test.ii template <class T> class nsRefPtr { T *mRawPtr; public: typedef T element_type; ~nsRefPtr() { mRawPtr->Release; } }; class nsSlots { public: virtual ~nsSlots(); }; class A; class B : nsSlots { nsRefPtr<A> mContainingShadow; }; markus@x4 html % g++ -O2 -c test.ii test.ii: In instantiation of ‘nsRefPtr<T>::~nsRefPtr() [with T = A]’: test.ii:14:7: required from here test.ii:6:17: error: invalid use of incomplete type ‘class A’ ~nsRefPtr() { mRawPtr->Release; } ^ test.ii:13:7: error: forward declaration of ‘class A’ class A; ^