c++/5050: template instantiation depth exceeds/maybe recursio n problem

Tim Bagot tbagot@bluearc.com
Fri Sep 27 10:38:00 GMT 2002


http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=5050&databa
se=gcc

> State-Changed-From-To: analyzed-feedback
> State-Changed-By: jason
> State-Changed-When: Tue Apr  9 18:23:37 2002
> State-Changed-Why:
> Seems fixed now.

With gcc-3.2 I see the same problem with the following code, compiled using
gcc -c -ftemplate-depth-17 -O2 . (Without optimisation turned on it is
fine.)

struct ostream
{
    template<class T> ostream & operator <<( const T & )
    {
        return *this;
    }
};

void foo(ostream& os)
{
    os<<1<<2<<3<<4<<5<<6<<7<<8<<9<<10<<11<<12<<13<<14<<15<<16<<17<<18;
}


*********************************************************************
This e-mail and any attachment is confidential. It may only be read, copied and used by the intended recipient(s). If you are not the intended recipient(s), you may not copy, use, distribute, forward, store or disclose this e-mail or any attachment. If you are not the intended recipient(s) or have otherwise received this e-mail in error, you should destroy it and any attachment and notify the sender by reply e-mail or send a message to sysadmin@bluearc.com
*********************************************************************



More information about the Gcc-bugs mailing list