This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
971225 :: Internal compiler error 892.
- To: egcs-bugs at cygnus dot com
- Subject: 971225 :: Internal compiler error 892.
- From: Ovidiu Toader <ovi at physics dot utoronto dot ca>
- Date: Fri, 02 Jan 1998 11:35:24 -0500
- Organization: University of Toronto
albatros:~/bug/bug2> egcs_g++ -v
Reading specs from
/usr/local/egcs/lib/gcc-lib/i386-unknown-freebsd3.0/egcs-2.91.03/specs
gcc version egcs-2.91.03 971225 (gcc-2.8.0)
albatros:~/bug/bug2> egcs_g++ -o bug bug.cc
bug.cc:21: Internal compiler error 892.
bug.cc:21: Please submit a full bug report to `egcs-bugs@cygnus.com'.
albatros:~/bug/bug2> cat bug.cc
#include <iostream.h>
#include <typeinfo>
template <typename T>
class A {
public:
void test ();
};
template <typename T>
void
A<T>::test(){
cerr << "test for " << typeid(*this).name() << endl;
}
// Specialization declaration
void
A<double>::test();
// Specialization definition
void
A<double>::test(){ // ============= LINE 21 ==================
cerr << "specialization for " << typeid(*this).name() << endl;
}
int
main(){
A<int> ai;
A<double> ad;
ai.test();
ad.test();
return 0;
}
The program is trying to declare a specialization for test() and then
define the actual specialization.
--
Ovidiu