This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
more than one level of scope resolution on class template causes internal compiler error
- To: egcs-bugs at cygnus dot com
- Subject: more than one level of scope resolution on class template causes internal compiler error
- From: RHS Linux User <ramesh at gvg dot vinayagar-systems dot com>
- Date: Thu, 7 May 1998 09:28:34 -0700
Dear egcs-cists,
Found a problem with more than one level of scope resolution on a
class template. I am enclosing a chopped down program and compiler
error (Internal compiler error 90).
regards,
Ramesh
>-- templ_nesting00.cpp
#include <map>
template<class T1, class T2>
class C {
public:
typedef map<T1, T2> T1_to_T2_Map;
private:
T1_to_T2_Map t1Tot2;
};
template<class T1, class T2>
ostream& operator<<(ostream& os, C<T1,T2>& O)
{
typename C<T1,T2>::T1_to_T2_Map foo;
typename C<T1,T2>::T1_to_T2_Map::iterator start, end;
}
main()
{
C<int,int> it;
}
>--
>-- result of 'g++ -v -o it templ_nesting00.cpp'
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.27/specs
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.27/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -Di386 -D__ELF__ -Dunix -Dlinux -D__i386__ -D__ELF__ -D__unix__ -D__linux__ -D__i386 -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Di386 -Di686 -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__i386__ -D__i686__ -Asystem(unix) -Acpu(i386) -Amachine(i386) templ_nesting00.cpp /tmp/cca22198.ii
GNU CPP version egcs-2.90.27 980315 (egcs-1.0.2 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/g++
/usr/local/include
/usr/local/i686-pc-linux-gnu/include
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.27/include
/usr/include
End of search list.
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.27/cc1plus /tmp/cca22198.ii -quiet -dumpbase templ_nesting00.cc -version -o /tmp/cca22198.s
GNU C++ version egcs-2.90.27 980315 (egcs-1.0.2 release) (i686-pc-linux-gnu) compiled by GNU C version egcs-2.90.27 980315 (egcs-1.0.2 release).
templ_nesting00.cpp: In function `class ostream & operator <<(class ostream &, class C<T1,T2> &)':
templ_nesting00.cpp:15: Internal compiler error 90.
templ_nesting00.cpp:15: Please submit a full bug report to `egcs-bugs@cygnus.com'.