PATCH: Make libstdc++-v3 testable

Theodore Papadopoulo Theodore.Papadopoulo@sophia.inria.fr
Thu Oct 26 11:28:00 GMT 2000


mark@codesourcery.com said:
> Next, I'll start fixing up the bugs that show up with libstdc++-v3
> enabled; most appear to be bugs in the testsuite, rather than in the
> compiler or library.

A few weeks ago, I started doing exactly this (by hand while I should 
have automated it :-( ). The result is incomplete and untested since
as you mention the whole testsuite was not working very well with
libstdc++-v3 enabled... Anyway, if you find it useful, feel free to 
use this.

	Theo.

Index: g++.dg/special/conpr-1.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.dg/special/conpr-1.C,v
retrieving revision 1.3
diff -c -3 -p -r1.3 conpr-1.C
*** conpr-1.C	2000/05/28 05:38:01	1.3
--- conpr-1.C	2000/10/26 18:18:32
***************
*** 1,6 ****
  /* { dg-do run } */
  
! #include <stdlib.h>
  
  class foo_t {
      int x;
--- 1,6 ----
  /* { dg-do run } */
  
! #include <cstdlib>
  
  class foo_t {
      int x;
*************** static foo_t foo __attribute__((init_pri
*** 14,20 ****
  int main(void) {
  
      if (foo.get())
!         exit(0);
      else
!         abort();
  }
--- 14,20 ----
  int main(void) {
  
      if (foo.get())
!         std::exit(0);
      else
!         std::abort();
  }
Index: g++.dg/special/conpr-2.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.dg/special/conpr-2.C,v
retrieving revision 1.3
diff -c -3 -p -r1.3 conpr-2.C
*** conpr-2.C	2000/05/28 05:38:01	1.3
--- conpr-2.C	2000/10/26 18:18:32
***************
*** 1,6 ****
  /* { dg-do run } */
  
! #include <stdlib.h>
  
  class foo_t {
      int x;
--- 1,6 ----
  /* { dg-do run } */
  
! #include <cstdlib>
  
  class foo_t {
      int x;
*************** extern foo_t foo1, foo2;
*** 17,22 ****
  int main(void) {
  
      if ( (foo1.get() != 2) || (foo2.get() != 1) )
!         abort();
!     exit(0);
  }
--- 17,22 ----
  int main(void) {
  
      if ( (foo1.get() != 2) || (foo2.get() != 1) )
!         std::abort();
!     std::exit(0);
  }
Index: g++.dg/special/conpr-3.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.dg/special/conpr-3.C,v
retrieving revision 1.3
diff -c -3 -p -r1.3 conpr-3.C
*** conpr-3.C	2000/05/28 05:38:01	1.3
--- conpr-3.C	2000/10/26 18:18:32
***************
*** 1,6 ****
  /* { dg-do run } */
  
! #include <stdlib.h>
  
  class foo_t {
      int x;
--- 1,6 ----
  /* { dg-do run } */
  
! #include <cstdlib>
  
  class foo_t {
      int x;
*************** extern foo_t foo1, foo2;
*** 17,22 ****
  int main(void) {
  
      if ( (foo1.get() != 2) || (foo2.get() != 1) )
!         abort();
!     exit(0);
  }
--- 17,22 ----
  int main(void) {
  
      if ( (foo1.get() != 2) || (foo2.get() != 1) )
!         std::abort();
!     std::exit(0);
  }
Index: g++.old-deja/g++.abi/arraynew.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.abi/arraynew.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 arraynew.C
*** arraynew.C	2000/03/03 02:29:35	1.2
--- arraynew.C	2000/10/26 18:18:32
*************** void* p;
*** 10,16 ****
  void* operator new[](size_t s) throw (bad_alloc)
  {
    // Record the base of the last array allocated.
!   p = malloc (s);
    return p;
  }
  
--- 10,16 ----
  void* operator new[](size_t s) throw (bad_alloc)
  {
    // Record the base of the last array allocated.
!   p = std::malloc (s);
    return p;
  }
  
*************** void check_no_cookie (int i)
*** 19,34 ****
  {
    void* a = new T[7];
    if (p != a)
!     exit (i);
  }
  
  template <typename T>
  void check_no_placement_cookie (int i)
  {
!   p = malloc (13 * sizeof (T));
    void* a = new (p) T[13];
    if (p != a)
!     exit (i);
  }
  
  template <typename T>
--- 19,34 ----
  {
    void* a = new T[7];
    if (p != a)
!     std::exit (i);
  }
  
  template <typename T>
  void check_no_placement_cookie (int i)
  {
!   p = std::malloc (13 * sizeof (T));
    void* a = new (p) T[13];
    if (p != a)
!     std::exit (i);
  }
  
  template <typename T>
*************** void check_cookie (int i)
*** 41,58 ****
    if (x < sizeof (size_t))
      x = sizeof (size_t);
    if ((char *) a - x != (char *) p)
!     exit (i);
  
    // Check the cookie value.
    size_t *sp = ((size_t *) a) - 1;
    if (*sp != 11)
!     exit (i);
  }
  
  template <typename T>
  void check_placement_cookie (int i)
  {
!   p = malloc (sizeof (T) * 11 + 100);
    void* a = new (p) T[11];
    
    // Compute the cookie location manually.
--- 41,58 ----
    if (x < sizeof (size_t))
      x = sizeof (size_t);
    if ((char *) a - x != (char *) p)
!     std::exit (i);
  
    // Check the cookie value.
    size_t *sp = ((size_t *) a) - 1;
    if (*sp != 11)
!     std::exit (i);
  }
  
  template <typename T>
  void check_placement_cookie (int i)
  {
!   p = std::malloc (sizeof (T) * 11 + 100);
    void* a = new (p) T[11];
    
    // Compute the cookie location manually.
*************** void check_placement_cookie (int i)
*** 60,71 ****
    if (x < sizeof (size_t))
      x = sizeof (size_t);
    if ((char *) a - x != (char *) p)
!     exit (i);
  
    // Check the cookie value.
    size_t *sp = ((size_t *) a) - 1;
    if (*sp != 11)
!     exit (i);
  }
  
  struct X {};
--- 60,71 ----
    if (x < sizeof (size_t))
      x = sizeof (size_t);
    if ((char *) a - x != (char *) p)
!     std::exit (i);
  
    // Check the cookie value.
    size_t *sp = ((size_t *) a) - 1;
    if (*sp != 11)
!     std::exit (i);
  }
  
  struct X {};
Index: g++.old-deja/g++.abi/bitfields.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.abi/bitfields.C,v
retrieving revision 1.1
diff -c -3 -p -r1.1 bitfields.C
*** bitfields.C	1999/12/03 16:45:53	1.1
--- bitfields.C	2000/10/26 18:18:32
*************** check_bits (char *buf,
*** 55,61 ****
  #define CHECK_FIELD(AGGREGATE, FIELD, START_BIT, NUM_BITS, RVAL)          \
    do {                                                                    \
      AGGREGATE a__;                                                        \
!     memset (& a__, 0, sizeof (a__));                                      \
      a__.FIELD = -1;                                                       \
      if (! check_bits ((char *) & a__, sizeof (a__), START_BIT, NUM_BITS)) \
        return RVAL;                                                        \
--- 55,61 ----
  #define CHECK_FIELD(AGGREGATE, FIELD, START_BIT, NUM_BITS, RVAL)          \
    do {                                                                    \
      AGGREGATE a__;                                                        \
!     std::memset (& a__, 0, sizeof (a__));                                 \
      a__.FIELD = -1;                                                       \
      if (! check_bits ((char *) & a__, sizeof (a__), START_BIT, NUM_BITS)) \
        return RVAL;                                                        \
Index: g++.old-deja/g++.abi/cxa_vec.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C,v
retrieving revision 1.1
diff -c -3 -p -r1.1 cxa_vec.C
*** cxa_vec.C	2000/04/09 16:05:49	1.1
--- cxa_vec.C	2000/10/26 18:18:32
***************
*** 4,13 ****
  
  #if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
  #include <cxxabi.h>
! #include <stdio.h>
  #include <new>
! #include <malloc.h>
! #include <setjmp.h>
  
  static int ctor_count = 0;
  static int dtor_count = 0;
--- 4,13 ----
  
  #if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
  #include <cxxabi.h>
! #include <cstdio>
  #include <new>
! #include <cstdlib>
! #include <csetjmp>
  
  static int ctor_count = 0;
  static int dtor_count = 0;
*************** static void dtor (void *)
*** 36,42 ****
  static int blocks = 0;
  void *operator new[] (std::size_t size) throw (std::bad_alloc)
  {
!   void *ptr = malloc (size);
    
    if (!ptr)
      throw std::bad_alloc ();
--- 36,42 ----
  static int blocks = 0;
  void *operator new[] (std::size_t size) throw (std::bad_alloc)
  {
!   void *ptr = std::malloc (size);
    
    if (!ptr)
      throw std::bad_alloc ();
*************** void test0 ()
*** 73,88 ****
            void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor);
            abi::__cxa_vec_delete (ary, 1, sizeof (std::size_t), dtor);
            if (ctor_count || dtor_count || blocks)
!             longjmp (jump, 1);
          }
        catch (...)
          {
!           longjmp (jump, 2);
          }
      }
    else
      {
!       longjmp (jump, 3);
      }
    return;
  }
--- 73,88 ----
            void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor);
            abi::__cxa_vec_delete (ary, 1, sizeof (std::size_t), dtor);
            if (ctor_count || dtor_count || blocks)
!             std::longjmp (jump, 1);
          }
        catch (...)
          {
!           std::longjmp (jump, 2);
          }
      }
    else
      {
!       std::longjmp (jump, 3);
      }
    return;
  }
*************** void test1 ()
*** 105,122 ****
        try
          {
            void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor);
!           longjmp (jump, 1);
          }
        catch (...)
          {
            // we expect to get here
            if (ctor_count || dtor_count != 1 || blocks)
!             longjmp (jump, 2);
          }
      }
    else
      {
!       longjmp (jump, 3);
      }
    return;
  }
--- 105,122 ----
        try
          {
            void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor);
!           std::longjmp (jump, 1);
          }
        catch (...)
          {
            // we expect to get here
            if (ctor_count || dtor_count != 1 || blocks)
!             std::longjmp (jump, 2);
          }
      }
    else
      {
!       std::longjmp (jump, 3);
      }
    return;
  }
*************** void test2 ()
*** 139,156 ****
          {
            void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor);
            abi::__cxa_vec_delete (ary, 1, sizeof (std::size_t), dtor);
!           longjmp (jump, 1);
          }
        catch (...)
          {
            // we expect to get here
            if (ctor_count || dtor_count != -2u || blocks)
!             longjmp (jump, 2);
          }
      }
    else
      {
!       longjmp (jump, 3);
      }
    return;
  }
--- 139,156 ----
          {
            void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor);
            abi::__cxa_vec_delete (ary, 1, sizeof (std::size_t), dtor);
!           std::longjmp (jump, 1);
          }
        catch (...)
          {
            // we expect to get here
            if (ctor_count || dtor_count != -2u || blocks)
!             std::longjmp (jump, 2);
          }
      }
    else
      {
!       std::longjmp (jump, 3);
      }
    return;
  }
*************** void test3 ()
*** 175,194 ****
          {
            void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor);
            abi::__cxa_vec_delete (ary, 1, sizeof (std::size_t), dtor);
!           longjmp (jump, 1);
          }
        catch (...)
          {
            // we do not expect to get here
!           longjmp (jump, 2);
          }
      }
    else
      {
        // we expect to get here (via terminate)
        if (ctor_count || dtor_count || blocks != 1)
!         longjmp (jump, 3);
!       longjmp (jump, -1);
      }
    return;
  }
--- 175,194 ----
          {
            void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor);
            abi::__cxa_vec_delete (ary, 1, sizeof (std::size_t), dtor);
!           std::longjmp (jump, 1);
          }
        catch (...)
          {
            // we do not expect to get here
!           std::longjmp (jump, 2);
          }
      }
    else
      {
        // we expect to get here (via terminate)
        if (ctor_count || dtor_count || blocks != 1)
!         std::longjmp (jump, 3);
!       std::longjmp (jump, -1);
      }
    return;
  }
*************** void test4 ()
*** 212,231 ****
        try
          {
            void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor);
!           longjmp (jump, 1);
          }
        catch (...)
          {
            // we do not expect to get here
!           longjmp (jump, 2);
          }
      }
    else
      {
        // we expect to get here (via terminate)
        if (ctor_count || dtor_count != -1u || blocks != 1)
!         longjmp (jump, 3);
!       longjmp (jump, -1);
      }
    return;
  }
--- 212,231 ----
        try
          {
            void *ary = abi::__cxa_vec_new (5, 1, sizeof (std::size_t), ctor, dtor);
!           std::longjmp (jump, 1);
          }
        catch (...)
          {
            // we do not expect to get here
!           std::longjmp (jump, 2);
          }
      }
    else
      {
        // we expect to get here (via terminate)
        if (ctor_count || dtor_count != -1u || blocks != 1)
!         std::longjmp (jump, 3);
!       std::longjmp (jump, -1);
      }
    return;
  }
*************** int main ()
*** 248,254 ****
    
    for (ix = 0; tests[ix]; ix++)
      {
!       if (n = setjmp (jump))
          {
            if (n > 0)
              {
--- 248,254 ----
    
    for (ix = 0; tests[ix]; ix++)
      {
!       if (n = std::setjmp (jump))
          {
            if (n > 0)
              {
Index: g++.old-deja/g++.abi/ptrflags.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.abi/ptrflags.C,v
retrieving revision 1.4
diff -c -3 -p -r1.4 ptrflags.C
*** ptrflags.C	2000/08/09 09:52:47	1.4
--- ptrflags.C	2000/10/26 18:18:32
*************** struct B;
*** 12,18 ****
  
  using namespace abi;
  
! int expect (int flags, type_info const &info)
  {
    __pbase_type_info const *ptr =
        dynamic_cast <__pbase_type_info const *> (&info);
--- 12,18 ----
  
  using namespace abi;
  
! int expect (int flags, std::type_info const &info)
  {
    __pbase_type_info const *ptr =
        dynamic_cast <__pbase_type_info const *> (&info);
Index: g++.old-deja/g++.abi/vtable2.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.abi/vtable2.C,v
retrieving revision 1.3
diff -c -3 -p -r1.3 vtable2.C
*** vtable2.C	2000/06/04 21:12:25	1.3
--- vtable2.C	2000/10/26 18:18:32
***************
*** 2,8 ****
  
  #if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
  
! #include <stddef.h>
  
  struct S0
  {
--- 2,8 ----
  
  #if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
  
! #include <cstddef>
  
  struct S0
  {
Index: g++.old-deja/g++.benjamin/14687.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/14687.C,v
retrieving revision 1.4
diff -c -3 -p -r1.4 14687.C
*** 14687.C	2000/02/27 06:54:04	1.4
--- 14687.C	2000/10/26 18:18:32
***************
*** 1,7 ****
  // 981203 bkoz
  // g++/14687
  
! #include <assert.h>
  unsigned int gtest;
  
  // 7.3.3 the using declaration
--- 1,7 ----
  // 981203 bkoz
  // g++/14687
  
! #include <cassert>
  unsigned int gtest;
  
  // 7.3.3 the using declaration
Index: g++.old-deja/g++.benjamin/15071.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/15071.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 15071.C
*** 15071.C	1998/12/16 21:21:46	1.2
--- 15071.C	2000/10/26 18:18:34
***************
*** 2,11 ****
  // g++/15071
  // gcc invocation fails to link in libstdc++
  
! #include <iostream.h>
  
  int main() {
!   cout<<"hi"<<endl;
  
    return 0;
  }
--- 2,11 ----
  // g++/15071
  // gcc invocation fails to link in libstdc++
  
! #include <iostream>
  
  int main() {
!   std::cout<<"hi"<<endl;
  
    return 0;
  }
Index: g++.old-deja/g++.benjamin/15351-1.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/15351-1.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 15351-1.C
*** 15351-1.C	1998/12/16 21:21:49	1.2
--- 15351-1.C	2000/10/26 18:18:34
***************
*** 2,8 ****
  // g++/15351 - test
  // Special g++ Options: -fno-const-strings
  
! #include <assert.h>
  
  bool gtest;
  
--- 2,8 ----
  // g++/15351 - test
  // Special g++ Options: -fno-const-strings
  
! #include <cassert>
  
  bool gtest;
  
Index: g++.old-deja/g++.benjamin/15351-2.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/15351-2.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 15351-2.C
*** 15351-2.C	1998/12/16 21:21:50	1.2
--- 15351-2.C	2000/10/26 18:18:34
***************
*** 2,8 ****
  // g++/15351 + test
  // Special g++ Options: -fconst-strings
  
! #include <assert.h>
  
  bool gtest;
  
--- 2,8 ----
  // g++/15351 + test
  // Special g++ Options: -fconst-strings
  
! #include <cassert>
  
  bool gtest;
  
*************** int main() 
*** 20,26 ****
  {
    foo();
    if (!gtest)
!     assert (0);
  
    return !gtest;
  }
--- 20,26 ----
  {
    foo();
    if (!gtest)
!     std::assert (0);
  
    return !gtest;
  }
Index: g++.old-deja/g++.benjamin/15756-2.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/15756-2.C,v
retrieving revision 1.3
diff -c -3 -p -r1.3 15756-2.C
*** 15756-2.C	2000/06/12 23:48:10	1.3
--- 15756-2.C	2000/10/26 18:18:34
***************
*** 4,10 ****
  // Special g++ Options: -Wsign-promo
  // this test may only be valid for 32bit targets at present
  
! #include <limits.h>
  
  enum e_i {
    vali
--- 4,10 ----
  // Special g++ Options: -Wsign-promo
  // this test may only be valid for 32bit targets at present
  
! #include <climits>
  
  enum e_i {
    vali
*************** int main ()
*** 41,50 ****
    obj_i.foo();
    obj_ui.foo();
  }
-  
- 
- 
- 
- 
- 
- 
--- 41,43 ----
Index: g++.old-deja/g++.benjamin/15822.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/15822.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 15822.C
*** 15822.C	1998/12/16 21:21:57	1.2
--- 15822.C	2000/10/26 18:18:34
***************
*** 1,7 ****
  // 981203 bkoz
  // g++/15822
  
! #include <assert.h>
  
  static unsigned int gcount;
  
--- 1,7 ----
  // 981203 bkoz
  // g++/15822
  
! #include <cassert>
  
  static unsigned int gcount;
  
*************** int main() 
*** 21,27 ****
  {
     playacoco bar[2];
     foo(bar);
!    assert (gcount == 0);
  
     return 0;
  }
--- 21,27 ----
  {
     playacoco bar[2];
     foo(bar);
!    std::assert (gcount == 0);
  
     return 0;
  }
Index: g++.old-deja/g++.benjamin/bool01.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/bool01.C,v
retrieving revision 1.5
diff -c -3 -p -r1.5 bool01.C
*** bool01.C	2000/06/15 00:14:07	1.5
--- bool01.C	2000/10/26 18:18:34
***************
*** 1,8 ****
  //980323 bkoz
  //test for bools with inclusive ors
  
! #include <assert.h>
! #include <limits.h>
  
  void bar ( bool  x ) {};
  void bars ( short  x ) {};
--- 1,8 ----
  //980323 bkoz
  //test for bools with inclusive ors
  
! #include <cassert>
! #include <climits>
  
  void bar ( bool  x ) {};
  void bars ( short  x ) {};
Index: g++.old-deja/g++.benjamin/bool02.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/bool02.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 bool02.C
*** bool02.C	1998/12/16 21:22:04	1.2
--- bool02.C	2000/10/26 18:18:34
***************
*** 1,7 ****
  //980324 bkoz
  //test for bool and bitwise ands
  
! #include <assert.h>
  
  
  void bar ( bool  x ) {};
--- 1,7 ----
  //980324 bkoz
  //test for bool and bitwise ands
  
! #include <cassert>
  
  
  void bar ( bool  x ) {};
*************** int main() {
*** 49,63 ****
    int tmp;
  #if 0
    tmp = andb();
!   assert (tmp == 1 || tmp == 0);
  #endif
    tmp = andbtrue();
!   assert (tmp == 1);
    tmp = andbfalse();
!   assert (tmp == 0);
    tmp = andbfalse2();
!   assert (tmp == 0);
    tmp = ands();
!   assert (tmp == 1);
    return 0;
  }
--- 49,63 ----
    int tmp;
  #if 0
    tmp = andb();
!   std::assert (tmp == 1 || tmp == 0);
  #endif
    tmp = andbtrue();
!   std::assert (tmp == 1);
    tmp = andbfalse();
!   std::assert (tmp == 0);
    tmp = andbfalse2();
!   std::assert (tmp == 0);
    tmp = ands();
!   std::assert (tmp == 1);
    return 0;
  }
Index: g++.old-deja/g++.benjamin/p12475.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C,v
retrieving revision 1.6
diff -c -3 -p -r1.6 p12475.C
*** p12475.C	1999/05/08 16:39:14	1.6
--- p12475.C	2000/10/26 18:18:34
***************
*** 1,7 ****
  // Build don't link:
  // prms-id: 12475
  
! #include <limits.h>
  
  #if LONG_MAX == 2147483647
  #define TEST 2147483648
--- 1,7 ----
  // Build don't link:
  // prms-id: 12475
  
! #include <climits>
  
  #if LONG_MAX == 2147483647
  #define TEST 2147483648
Index: g++.old-deja/g++.benjamin/scope02.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/scope02.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 scope02.C
*** scope02.C	1998/12/16 21:22:11	1.2
--- scope02.C	2000/10/26 18:18:34
*************** int main(void)
*** 200,208 ****
  #endif
    return 0;
  }
- 
- 
- 
- 
- 
- 
--- 200,202 ----
Index: g++.old-deja/g++.benjamin/tem03.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/tem03.C,v
retrieving revision 1.5
diff -c -3 -p -r1.5 tem03.C
*** tem03.C	1999/04/02 15:35:49	1.5
--- tem03.C	2000/10/26 18:18:34
*************** struct Xthirteen {
*** 198,209 ****
        return value;
    }
  };
- 
- 
- 
- 
- 
- 
- 
- 
- 
--- 198,200 ----
Index: g++.old-deja/g++.benjamin/tem04.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/tem04.C,v
retrieving revision 1.5
diff -c -3 -p -r1.5 tem04.C
*** tem04.C	1998/12/16 21:22:16	1.5
--- tem04.C	2000/10/26 18:18:34
*************** template <class T22> void f1() {// ERROR
*** 175,182 ****
      enum T22 { un, du, toi }; // ERROR - .*
    };
  }
- 
- 
- 
- 
- 
--- 175,177 ----
Index: g++.old-deja/g++.benjamin/tem05.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/tem05.C,v
retrieving revision 1.3
diff -c -3 -p -r1.3 tem05.C
*** tem05.C	2000/03/12 18:47:50	1.3
--- tem05.C	2000/10/26 18:18:34
*************** bool compare_ge(T2 test) {
*** 55,58 ****
      return true;
    return false;
  }
- 
--- 55,57 ----
Index: g++.old-deja/g++.benjamin/tem06.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/tem06.C,v
retrieving revision 1.3
diff -c -3 -p -r1.3 tem06.C
*** tem06.C	1998/12/16 21:22:18	1.3
--- tem06.C	2000/10/26 18:18:34
*************** the reason this goes away at -O is becau
*** 46,49 ****
  elided completely.  
  
  */
- 
--- 46,48 ----
Index: g++.old-deja/g++.benjamin/typeid01.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/typeid01.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 typeid01.C
*** typeid01.C	1998/12/16 21:22:22	1.2
--- typeid01.C	2000/10/26 18:18:34
***************
*** 4,10 ****
  
  #include <typeinfo>
  #ifdef DEBUG_ASSERT
! #include <assert.h>
  #endif
  
  // 4: local class in non-main function
--- 4,10 ----
  
  #include <typeinfo>
  #ifdef DEBUG_ASSERT
! #include <cassert>
  #endif
  
  // 4: local class in non-main function
Index: g++.old-deja/g++.benjamin/warn01.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/warn01.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 warn01.C
*** warn01.C	1998/12/16 21:22:23	1.2
--- warn01.C	2000/10/26 18:18:34
*************** public:
*** 89,98 ****
    Mutex2(int i = 0): counter(i) {};
    virtual ~Mutex2() {};
  } __attribute__ ((warn));  // WARNING - 
- 
- 
- 
- 
- 
- 
- 
--- 89,91 ----
Index: g++.old-deja/g++.benjamin/warn02.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/warn02.C,v
retrieving revision 1.3
diff -c -3 -p -r1.3 warn02.C
*** warn02.C	1998/12/16 21:22:24	1.3
--- warn02.C	2000/10/26 18:18:34
*************** public:
*** 46,54 ****
  
  extern int foo3(const char *);  // WARNING - 
  extern int foo3(const char *);  // WARNING - 
- 
- 
- 
- 
- 
- 
--- 46,48 ----
Index: g++.old-deja/g++.benjamin/warn03.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.benjamin/warn03.C,v
retrieving revision 1.3
diff -c -3 -p -r1.3 warn03.C
*** warn03.C	1998/12/16 21:22:25	1.3
--- warn03.C	2000/10/26 18:18:34
***************
*** 6,10 ****
  //shouldn't crash
  extern unsigned char *foo5[]; 
  extern unsigned char *foo5[]; 
- 
- 
--- 6,8 ----
Index: g++.old-deja/g++.bob/delete1.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.bob/delete1.C,v
retrieving revision 1.3
diff -c -3 -p -r1.3 delete1.C
*** delete1.C	1999/04/29 08:33:48	1.3
--- delete1.C	2000/10/26 18:18:34
***************
*** 1,5 ****
  // prms-id: 7330
! #include <stddef.h>
  int size = 0; 
  
  struct X {
--- 1,5 ----
  // prms-id: 7330
! #include <cstddef>
  int size = 0; 
  
  struct X {
Index: g++.old-deja/g++.bob/inherit2.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.bob/inherit2.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 inherit2.C
*** inherit2.C	1998/12/16 21:22:37	1.2
--- inherit2.C	2000/10/26 18:18:34
***************
*** 1,11 ****
  // Build don't link:
  class A {
  public:
    void z();
    A(void) {}
  private:
!   A(const A &) { abort(); } // ERROR - 
!   const A& operator =(const A &) { abort(); }
  };
  
  class B : public A {
--- 1,12 ----
  // Build don't link:
+ #include <cstdlib>
  class A {
  public:
    void z();
    A(void) {}
  private:
!   A(const A &) { std::abort(); } // ERROR - 
!   const A& operator =(const A &) { std::abort(); }
  };
  
  class B : public A {
Index: g++.old-deja/g++.brendan/code-gen4.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.brendan/code-gen4.C,v
retrieving revision 1.4
diff -c -3 -p -r1.4 code-gen4.C
*** code-gen4.C	2000/05/28 13:42:46	1.4
--- code-gen4.C	2000/10/26 18:18:34
***************
*** 9,16 ****
  //
  // Workaround - declare "f1_arg" as type "short int".
  
! #include <stdio.h>
! #include <stdlib.h>
  
  short int v2;
  
--- 9,16 ----
  //
  // Workaround - declare "f1_arg" as type "short int".
  
! #include <cstdio>
! #include <cstdlib>
  
  short int v2;
  
*************** int main ()
*** 26,32 ****
  	f1 (v1);
  
  	if (v2 != 0x00007777)
! 	  abort ();
  	else
! 	  printf ("PASS\n");
  }
--- 26,32 ----
  	f1 (v1);
  
  	if (v2 != 0x00007777)
! 	  std::abort ();
  	else
! 	  std::printf ("PASS\n");
  }
Index: g++.old-deja/g++.jason/template31.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.jason/template31.C,v
retrieving revision 1.5
diff -c -3 -p -r1.5 template31.C
*** template31.C	2000/06/12 23:48:11	1.5
--- template31.C	2000/10/26 18:18:34
*************** private:
*** 33,39 ****
  int main(int argc, char**argv)   {
      IncludeIt foo;
      IncludeIt* bar;
!     exit(0);
  }
  
  template class std::__malloc_alloc_template<0>;
--- 33,39 ----
  int main(int argc, char**argv)   {
      IncludeIt foo;
      IncludeIt* bar;
!     std::exit(0);
  }
  
  template class std::__malloc_alloc_template<0>;
Index: g++.old-deja/g++.law/ctors10.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.law/ctors10.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 ctors10.C
*** ctors10.C	1998/12/16 21:39:34	1.2
--- ctors10.C	2000/10/26 18:18:34
***************
*** 6,19 ****
  // Subject: bug019.cc
  // Date: Fri, 5 Feb 93 15:51:42 -0800
  
! #include <iostream.h>
  
  class Class
  {
!         class Err : public ostream
          {
          public:
!                 Err(void) : ostream() { }
                  ~Err(void) { }
          };
  public:
--- 6,19 ----
  // Subject: bug019.cc
  // Date: Fri, 5 Feb 93 15:51:42 -0800
  
! #include <iostream>
  
  class Class
  {
!         class Err : public std::ostream
          {
          public:
!                 Err(void) : std::ostream() { }
                  ~Err(void) { }
          };
  public:
Index: g++.old-deja/g++.law/virtual3.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.law/virtual3.C,v
retrieving revision 1.3
diff -c -3 -p -r1.3 virtual3.C
*** virtual3.C	1998/12/16 21:42:44	1.3
--- virtual3.C	2000/10/26 18:18:34
***************
*** 5,15 ****
  // Date: 4 Nov 1993 22:57:36 -0500
  // Message-ID: <9311041820.AA05942@ramjet.multinet.DE>
  
! #include <iostream.h>
  #include <strstream.h>
  
  
! class BugStream : public ostrstream {
  public:
      BugStream() {}
      BugStream& eval();
--- 5,15 ----
  // Date: 4 Nov 1993 22:57:36 -0500
  // Message-ID: <9311041820.AA05942@ramjet.multinet.DE>
  
! #include <iostream>
  #include <strstream.h>
  
  
! class BugStream : public std::ostrstream {
  public:
      BugStream() {}
      BugStream& eval();
*************** public:
*** 17,23 ****
  
  
  static struct Eval_ { } eval;
! BugStream& operator<<(ostream& os, Eval_);
  
  BugStream& BugStream::eval()
  {
--- 17,23 ----
  
  
  static struct Eval_ { } eval;
! BugStream& operator<<(std::ostream& os, Eval_);
  
  BugStream& BugStream::eval()
  {
*************** BugStream& BugStream::eval()
*** 26,32 ****
     
     // eval the command and set the status
     char* s = str();
!    cerr << s << endl;
     
     // reset the stream for the next command    
     clear(0);
--- 26,32 ----
     
     // eval the command and set the status
     char* s = str();
!    std::cerr << s << endl;
     
     // reset the stream for the next command    
     clear(0);
*************** BugStream& BugStream::eval()
*** 36,42 ****
     return *this;
  }
  
! BugStream& operator<<(ostream& os, Eval_)
  {
      return ((BugStream&)os).eval();
  }
--- 36,42 ----
     return *this;
  }
  
! BugStream& operator<<(std::ostream& os, Eval_)
  {
      return ((BugStream&)os).eval();
  }
Index: g++.old-deja/g++.law/weak.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.law/weak.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 weak.C
*** weak.C	1999/09/04 15:09:02	1.2
--- weak.C	2000/10/26 18:18:34
***************
*** 5,14 ****
  
  // libc-5.4.xx has __IO_putc in its static C library, which can conflict
  // with the copy of __IO_putc in the libstdc++ library built by egcs.
! #include <iostream.h>
  #include <streambuf.h>
  
! istream x;
  extern "C" int putc(), fgets();
  
  main () {
--- 5,14 ----
  
  // libc-5.4.xx has __IO_putc in its static C library, which can conflict
  // with the copy of __IO_putc in the libstdc++ library built by egcs.
! #include <iostream>
  #include <streambuf.h>
  
! std::istream x;
  extern "C" int putc(), fgets();
  
  main () {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00000.pgp
Type: text/x-c++
Size: 32776 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20001026/cd43a43a/attachment.bin>


More information about the Gcc-patches mailing list