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

eb125


This contains several errors which get properly detected.

Martin

Index: eb125.C
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/testsuite/g++.old-deja/g++.robertl/eb125.C,v
retrieving revision 1.1
diff -c -p -r1.1 eb125.C
*** eb125.C	1998/05/27 23:00:35	1.1
--- eb125.C	1998/06/01 10:23:42
*************** struct test_box
*** 1241,1247 ****
      void print(void) {cout << "this is a test" << endl;}
      };
  
! void test<class BOX> (test_box *);
  
  class test_square
      {
--- 1241,1247 ----
      void print(void) {cout << "this is a test" << endl;}
      };
  
! void test<class BOX> (test_box *);   // ERROR - illegal code
  
  class test_square
      {
*************** class test_square
*** 1250,1259 ****
  
  
  
! template <class BOX> void test(BOX *the_box)
      {
      the_box->print();
      };
  
! template void test<> (test_box *);
  
--- 1250,1259 ----
  
  
  
! template <class BOX> void test(BOX *the_box)  // ERROR - semicolon missing
      {
      the_box->print();
      };
  
! template void test<> (test_box *);     // ERROR - illegal code
  


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