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]

C++ PATCH: Fix ABI testcases



Some of the new ABI testcases need `std' qualification, now that
-fhonor-std is on by default.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

2000-11-15  Mark Mitchell  <mark@codesourcery.com>

	* g++.old-deja/g++.abi/arraynew.C: Use `std' where necessary.
	* g++.old-deja/g++.abi/cxa_vec.C: Likewise.
	* g++.old-deja/g++.abi/ptrflags.C: Likewise.
	* g++.old-deja/g++.abi/vmihint.C: Likewise.

Index: testsuite/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 -p -r1.2 arraynew.C
*** arraynew.C	2000/03/03 02:29:35	1.2
--- arraynew.C	2000/11/16 04:11:15
***************
*** 7,13 ****
  
  void* p;
  
! void* operator new[](size_t s) throw (bad_alloc)
  {
    // Record the base of the last array allocated.
    p = malloc (s);
--- 7,13 ----
  
  void* p;
  
! void* operator new[](size_t s) throw (std::bad_alloc)
  {
    // Record the base of the last array allocated.
    p = malloc (s);
Index: testsuite/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 -p -r1.1 cxa_vec.C
*** cxa_vec.C	2000/04/09 16:05:49	1.1
--- cxa_vec.C	2000/11/16 04:11:15
*************** void test0 ()
*** 62,68 ****
    if (!started)
      {
        started = true;
!       set_terminate (test0);
        
        ctor_count = dtor_count = 5;
        dtor_repeat = false;
--- 62,68 ----
    if (!started)
      {
        started = true;
!       std::set_terminate (test0);
        
        ctor_count = dtor_count = 5;
        dtor_repeat = false;
*************** void test1 ()
*** 95,101 ****
    if (!started)
      {
        started = true;
!       set_terminate (test1);
        
        ctor_count = dtor_count = 5;
        dtor_repeat = false;
--- 95,101 ----
    if (!started)
      {
        started = true;
!       std::set_terminate (test1);
        
        ctor_count = dtor_count = 5;
        dtor_repeat = false;
*************** void test2 ()
*** 129,135 ****
    if (!started)
      {
        started = true;
!       set_terminate (test2);
        ctor_count = dtor_count = 5;
        dtor_repeat = false;
        blocks = 0;
--- 129,135 ----
    if (!started)
      {
        started = true;
!       std::set_terminate (test2);
        ctor_count = dtor_count = 5;
        dtor_repeat = false;
        blocks = 0;
*************** void test3 ()
*** 163,169 ****
    if (!started)
      {
        started = true;
!       set_terminate (test3);
        
        ctor_count = dtor_count = 5;
        dtor_repeat = false;
--- 163,169 ----
    if (!started)
      {
        started = true;
!       std::set_terminate (test3);
        
        ctor_count = dtor_count = 5;
        dtor_repeat = false;
*************** void test4 ()
*** 201,207 ****
    if (!started)
      {
        started = true;
!       set_terminate (test4);
        
        ctor_count = dtor_count = 5;
        dtor_repeat = false;
--- 201,207 ----
    if (!started)
      {
        started = true;
!       std::set_terminate (test4);
        
        ctor_count = dtor_count = 5;
        dtor_repeat = false;
Index: testsuite/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 -p -r1.4 ptrflags.C
*** ptrflags.C	2000/08/09 09:52:47	1.4
--- ptrflags.C	2000/11/16 04:11:16
*************** struct B;
*** 12,24 ****
  
  using namespace abi;
  
! int expect (int flags, type_info const &info)
  {
!   __pbase_type_info const *ptr =
!       dynamic_cast <__pbase_type_info const *> (&info);
    if (!ptr)
      return 0;
!   if (ptr->qualifier_flags != flags)
      return 0;
    return 1;
  }
--- 12,24 ----
  
  using namespace abi;
  
! int expect (int flags, std::type_info const &info)
  {
!   abi::__pbase_type_info const *ptr =
!       dynamic_cast <abi::__pbase_type_info const *> (&info);
    if (!ptr)
      return 0;
!   if (ptr->__qualifier_flags != flags)
      return 0;
    return 1;
  }
Index: testsuite/g++.old-deja/g++.abi/vmihint.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.abi/vmihint.C,v
retrieving revision 1.3
diff -c -p -r1.3 vmihint.C
*** vmihint.C	2000/08/09 09:52:47	1.3
--- vmihint.C	2000/11/16 04:11:16
*************** struct P2 : B, P1 {int m;};
*** 30,42 ****
  
  using namespace abi;
  
! int expect (int flags, type_info const &info)
  {
!   __vmi_class_type_info const *ptr =
!       dynamic_cast <__vmi_class_type_info const *> (&info);
    if (!ptr)
      return 0;
!   if (ptr->flags != flags)
      return 0;
    return 1;
  }
--- 30,42 ----
  
  using namespace abi;
  
! int expect (int flags, std::type_info const &info)
  {
!   abi::__vmi_class_type_info const *ptr =
!       dynamic_cast <abi::__vmi_class_type_info const *> (&info);
    if (!ptr)
      return 0;
!   if (ptr->__flags != flags)
      return 0;
    return 1;
  }

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