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]

bug report...


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... :)


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