This is the mail archive of the gcc-bugs@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]

internal compiler error in egcs-19990524


[ If you need to reply to me, please use the kosak@cs.cmu.edu address. ]

I *think* this is legal code, and my surface reading of the templates chapter 
of the standard hasn't dissuaded me...


> cat bug.cc && g++ -v && g++ bug.cc
template<template<class> class T> void func1()
{
}

template<template<class> class T> void func2()
{
  func1<T>();
}

template<class T> struct cow {};

int main()
{
  func2<cow>();
  return 0;
}
Reading specs from 
/afs/cs.cmu.edu/project/cmcl-kosak/various-gcc/egcs-19990524/
i386_linux3/lib/gcc-lib/i686-pc-linux-gnu/gcc-2.95/specs
gcc version gcc-2.95 19990524 (prerelease)
bug.cc: In instantiation of `func1<T>()':
bug.cc:7:   instantiated from `func2<template <class T> cow<T> >()'
bug.cc:14:   instantiated from here
bug.cc:2: Internal compiler error.
bug.cc:2: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
bug.cc:2: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.


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