vec.cc (__cxa_vec_delete2): If given a NULL pointer, immediately return.
authorJeffrey D. Oldham <oldham@gcc.gnu.org>
Wed, 5 Nov 2003 04:37:03 +0000 (04:37 +0000)
committerJeffrey D. Oldham <oldham@gcc.gnu.org>
Wed, 5 Nov 2003 04:37:03 +0000 (04:37 +0000)
2003-11-04  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.

From-SVN: r73263

libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/vec.cc

index 9124c8d0ed32e2fac0ac0a8f6926297a4d0608fa..9066d6096bfa4c93fcab6b233d9ad30b73876804 100644 (file)
@@ -1,3 +1,9 @@
+2003-11-04  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.
+       
 2003-11-03  Petur Runolfsson  <peturr02@ru.is>
 
        PR libstdc++/12790
        * include/bits/istream.tcc: Same.
        * include/bits/ostream.tcc: Same.
 
+>>>>>>> 1.2063
 2003-10-30  Paolo Carlini  <pcarlini@suse.de>
 
        * include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
index e2c8f09df4bd9719bf4e298113fecbf947541a07..2725593ff530a6d181bd8c06ce1c42986ba79ab1 100644 (file)
@@ -282,7 +282,12 @@ namespace __cxxabiv1
                    void (*destructor) (void *),
                    void (*dealloc) (void *))
   {
-    char *base = static_cast<char *>(array_address);
+    char *base;
+  
+    if (!array_address)
+      return;
+
+    base = static_cast<char *>(array_address);
   
     if (padding_size)
       {
@@ -312,8 +317,14 @@ namespace __cxxabiv1
                     void (*destructor) (void *),
                    void (*dealloc) (void *, std::size_t))
   {
-    char *base = static_cast <char *> (array_address);
-    std::size_t size = 0;
+    char *base;
+    std::size_t size;
+    
+    if (!array_address)
+      return;
+
+    base = static_cast <char *> (array_address);
+    size = 0;
     
     if (padding_size)
       {