summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/libsupc++
diff options
context:
space:
mode:
authoroldham <oldham@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-05 04:37:03 +0000
committeroldham <oldham@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-05 04:37:03 +0000
commit1dc58c21d79fbb08a1d2210ad324cc65f921ffdf (patch)
treef594dd7812e9b82194b071677b0cb8f5408a4ecc /libstdc++-v3/libsupc++
parent492128c9a1a8510692c5502530a3bd83934940f7 (diff)
downloadppe42-gcc-1dc58c21d79fbb08a1d2210ad324cc65f921ffdf.tar.gz
ppe42-gcc-1dc58c21d79fbb08a1d2210ad324cc65f921ffdf.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73263 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/libsupc++')
-rw-r--r--libstdc++-v3/libsupc++/vec.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/libstdc++-v3/libsupc++/vec.cc b/libstdc++-v3/libsupc++/vec.cc
index e2c8f09df4b..2725593ff53 100644
--- a/libstdc++-v3/libsupc++/vec.cc
+++ b/libstdc++-v3/libsupc++/vec.cc
@@ -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)
{
OpenPOWER on IntegriCloud