This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

[Q] ICE member function template in template class scope



 /*
  egcs@cygnus.com,
  egcs-bugs@cygnus.com

  reply to  :
                vcvjetko@linux.rulz.zg.tel.hr
  cvjetko@linux.rulz.rt.e-technik.uni-erlangen.de

                by removing praising the best OS

  [Q] ICE member function template in template class scope

  Hi there!

  I think this could interest U. I know that the function decl for f
  is ill formed, but it still produces ICE.

  Thanx

  mel
*/

template <class T>
class X
{
  template<class T>
  void f();
};

template <class T>
void
X<T>::f()
{
};
 

int main()
{
  X<int> xi;

  return;
};

/*
  ----------------------------------------------------------------------
> e++ -v ICE_egcs_1.1.1_template_within_template.cpp
Reading specs from /usr/egcs/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
 /usr/egcs/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.60/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__pentium -D__pentium__ ICE_egcs_1.1.1_template_within_template.cpp /tmp/cchBLj5l.ii
GNU CPP version egcs-2.91.60 19981201 (egcs-1.1.1 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/egcs/include/g++
 /usr/local/include
 /usr/egcs/i586-pc-linux-gnulibc1/include
 /usr/egcs/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.60/include
 /usr/include
End of search list.
 /usr/egcs/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.60/cc1plus /tmp/cchBLj5l.ii -quiet -dumpbase ICE_egcs_1.1.1_template_within_template.cc -version -o /tmp/ccYi0hcU.s
GNU C++ version egcs-2.91.60 19981201 (egcs-1.1.1 release) (i586-pc-linux-gnulibc1) compiled by GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release).
ICE_egcs_1.1.1_template_within_template.cpp: In method `void X<T>::f()':
ICE_egcs_1.1.1_template_within_template.cpp:33: Internal compiler error.
ICE_egcs_1.1.1_template_within_template.cpp:33: Please submit a full bug report to `egcs-bugs@cygnus.com'.
ICE_egcs_1.1.1_template_within_template.cpp:33: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
>
  ----------------------------------------------------------------------
 */
 

/*
Miljenko Jurica Cvjetko Dipl.Ing.
Lehrstuhl fuer Regelungstechnik 
Universitaet Erlangen-Nuernberg
e-mail:  
         m.cvjetko-no-spam@rt.e-technik.uni-erlangen.de
         vcvjetko-no-spam@zg.tel.hr
         remove (-no-spam) when replying please!!!
*/