Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Nils McCarthy
Mon, 28 Dec 1992 05:54
undeclared member functions in templates
Author: Nils McCarthy
Date: Mon, 28 Dec 1992 05:54
Date: Mon, 28 Dec 1992 05:54
35 lines
2150 bytes
2150 bytes
Under gcc2.3.3, mips-dec-ultrix4.2, the following code gives a
rather cryptic error message. i certainly didn't know i had
a member function named __vc.
template<class T> class foo {
};
template<class T> void foo<T>::operator []()
{
}
int main()
{
foo<int> bar;
return 0;
}
make testing
gcc -x c++ -v -g -Wall -I/u/hopper/local/include testing.cc -o testing
Reading specs from /usr/local/lib/gcc-lib/mips-dec-ultrix4.2/2.3.3/specs
gcc version 2.3.3
/usr/local/lib/gcc-lib/mips-dec-ultrix4.2/2.3.3/cpp -lang-c++ -v -I/u/hopper/local/include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__ANSI_COMPAT -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD -Dbsd4_2 -Dhost_mips -Dmips -Dultrix -Dunix -D__ANSI_COMPAT -D__MIPSEL__ -D__R3000__ -D__SYSTYPE_BSD__ -D___SYSTYPE_BSD__ -D__bsd4_2__ -D__host_mips__ -D__mips__ -D__ultrix__ -D__unix__ -D__ANSI_COMPAT -D__MIPSEL -D__R3000 -D__SYSTYPE_BSD -D___SYSTYPE_BSD -D__bsd4_2 -D__host_mips -D__mips -D__ultrix -D__unix
-g -Wall -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C testing.cc /usr/tmp/cca12299.i
GNU CPP version 2.3.3 [AL 1.1, MM 33] DECstation running ultrix
/usr/local/lib/gcc-lib/mips-dec-ultrix4.2/2.3.3/cc1plus /usr/tmp/cca12299.i -quiet -dumpbase testing.cc -g -Wall -version -o /usr/tmp/cca12299.s
GNU C++ version 2.3.3 [AL 1.1, MM 33] DECstation running ultrix compiled by GNU C version 2.3.3.
testing.cc: In function `int main ()':
testing.cc:2: method `__vc' not found in class `foo<int>'
testing.cc:2: warning: unused variable `bar'
make: *** [testing] Error 1
Compilation exited abnormally with code 1 at Mon Dec 28 12:51:02
-nils
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads