home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / gnu / gcc / bug / 3073 < prev    next >
Encoding:
Text File  |  1992-12-29  |  2.1 KB  |  48 lines

  1. Path: sparky!uunet!olivea!spool.mu.edu!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pc2.pc.maricopa.edu!nils
  2. From: nils@pc2.pc.maricopa.edu (Nils McCarthy)
  3. Newsgroups: gnu.gcc.bug
  4. Subject: undeclared member functions in templates
  5. Message-ID: <9212281954.AA12311@PC2.pc.maricopa.edu>
  6. Date: 28 Dec 92 05:54:39 GMT
  7. Sender: gnulists@ai.mit.edu
  8. Distribution: gnu
  9. Organization: GNUs Not Usenet
  10. Lines: 33
  11. Approved: bug-gcc@prep.ai.mit.edu
  12.  
  13. Under gcc2.3.3, mips-dec-ultrix4.2, the following code gives a
  14. rather cryptic error message. i certainly didn't know i had
  15. a member function named __vc.
  16.  
  17. template<class T> class foo {
  18. };
  19.  
  20. template<class T> void foo<T>::operator []()
  21. {
  22. }
  23.  
  24. int main()
  25. {
  26.   foo<int> bar;
  27.   return 0;
  28. }
  29.  
  30. make testing
  31. gcc -x c++ -v -g -Wall -I/u/hopper/local/include    testing.cc   -o testing
  32. Reading specs from /usr/local/lib/gcc-lib/mips-dec-ultrix4.2/2.3.3/specs
  33. gcc version 2.3.3
  34.  /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 
  35.  
  36. -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
  37. GNU CPP version 2.3.3 [AL 1.1, MM 33] DECstation running ultrix
  38.  /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
  39. GNU C++ version 2.3.3 [AL 1.1, MM 33] DECstation running ultrix compiled by GNU C version 2.3.3.
  40. testing.cc: In function `int  main ()':
  41. testing.cc:2: method `__vc' not found in class `foo<int>'
  42. testing.cc:2: warning: unused variable `bar'
  43. make: *** [testing] Error 1
  44.  
  45. Compilation exited abnormally with code 1 at Mon Dec 28 12:51:02
  46.  
  47. -nils
  48.