This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
bug report...
- To: egcs at cygnus dot com
- Subject: bug report...
- From: Artur Jorge Azevedo Carvalho <ajc at inescn dot pt>
- Date: Fri, 05 Jun 1998 13:23:54 +0200
- Reply-To: ajc at inescn dot pt
the enclosed program:
template< class T >
void sort( T* t, int n )
{ struct {
int operator()(T i, T j)
{
return (i < j) ? -1 : ((j < i) ? 1 : 0) ;
}
} c;
sort(t,n,c,0);
};
generates the following egcs-1.0.2 error:
In function `void sort(T *, int)':
In file included from teste.cc:1:
Internal compiler error.
this also happens with gcc-2.8.1
the error seems to be in having a struct defined inside a function
template
thanks... hope to hear from you... soon... :)