This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
EGCS asked for it
- To: "'egcs-bugs at cygnus dot com'" <egcs-bugs at cygnus dot com>
- Subject: EGCS asked for it
- From: Victor Bazarov <VBazarov at imsisoft dot com>
- Date: Tue, 9 Mar 1999 14:12:53 -0800
While compiling this text:
==========================================
template<class T,int n> T factorial()
{
return factorial<T,n-1>() * T(n);
}
template<class T,int n> T factorial<T,2>()
{ // this is line 7
return T(2);
}
int main()
{
int a = factorial<int,10>();
}
==========================================
I get
templ.cpp:7: Internal compiler error.
templ.cpp:7: Please submit a full bug report to `egcs-bugs@cygnus.com'.
Line 7 is marked.
g++ --version yields: egcs-2.90.29 980515 (egcs-1.0.3 release)
I suspect I am doing something wrong. Please help me figure out what.
Thank you.
Victor
--
Phone (415) 878-4261, 9 a.m. - 5 p.m. Pacific Time