This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: __cxa_vec_delete* Changes


2003-11-03 Jeffrey D. Oldham <oldham@codesourcery.com>

	* libsupc++/vec.cc (__cxa_vec_delete2): If given a NULL pointer,
	immediately return.  This reflects a C++ ABI change 2003 Nov 03.
	(__cxa_vec_delete3): Likewise.

Tested on i686-pc-linux-gnu by running check-g++ with no regressions.

Jeffrey D. Oldham
oldham@codesourcery.com
Index: libsupc++/vec.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/libsupc++/vec.cc,v
retrieving revision 1.11
diff -c -p -r1.11 vec.cc
*** libsupc++/vec.cc	10 Sep 2003 15:41:48 -0000	1.11
--- libsupc++/vec.cc	5 Nov 2003 03:05:02 -0000
*************** namespace __cxxabiv1
*** 282,288 ****
  		    void (*destructor) (void *),
  		    void (*dealloc) (void *))
    {
!     char *base = static_cast<char *>(array_address);
    
      if (padding_size)
        {
--- 282,293 ----
  		    void (*destructor) (void *),
  		    void (*dealloc) (void *))
    {
!     char *base;
!   
!     if (!array_address)
!       return;
! 
!     base = static_cast<char *>(array_address);
    
      if (padding_size)
        {
*************** namespace __cxxabiv1
*** 312,319 ****
  		     void (*destructor) (void *),
  		    void (*dealloc) (void *, std::size_t))
    {
!     char *base = static_cast <char *> (array_address);
!     std::size_t size = 0;
      
      if (padding_size)
        {
--- 317,330 ----
  		     void (*destructor) (void *),
  		    void (*dealloc) (void *, std::size_t))
    {
!     char *base;
!     std::size_t size;
!     
!     if (!array_address)
!       return;
! 
!     base = static_cast <char *> (array_address);
!     size = 0;
      
      if (padding_size)
        {

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