This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [3.3] Fix for 10428 breaks template instantiation
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: 05 May 2003 12:23:05 -0700
- Subject: Re: [3.3] Fix for 10428 breaks template instantiation
- References: <Pine.LNX.4.44.0305052041540.23713-100000@wotan.suse.de>
On Mon, 2003-05-05 at 11:51, Michael Matz wrote:
> Hi Mark,
>
> I noticed that the current 3.3 branch does not compile the below code
> anymore:
>
> -------- snip -------
> template<typename T>
> struct A {
> ~A() {p->unref();};
> T* p;
> };
>
> struct B;
>
> struct C {
> C() {}
> A<B> b;
> };
>
> struct B{
> void unref(void);
> };
> void B::unref(void) {}
>
> C c;
> -------- snap -------
That code is broken; this is a progression. As you say, B is not
complete when C::C() is defined.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com