This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [3.3] Fix for 10428 breaks template instantiation


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]