summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpme <pme@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-20 00:11:43 +0000
committerpme <pme@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-20 00:11:43 +0000
commit02ef63cc0971016ce62f43d87cd943bb77cfb45a (patch)
treec72dcc546d3cafe8c4ac8adad9e544eb18ab6f38
parenta4e88f7d81dde5d39a032d6b7bd9af813bc318ab (diff)
downloadgcc-02ef63cc0971016ce62f43d87cd943bb77cfb45a.tar.gz
2003-02-19 Phil Edwards <pme@gcc.gnu.org>
PR libstdc++/9582 * include/bits/stl_alloc.h: Remove all traces of assert(). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63136 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/bits/stl_alloc.h9
2 files changed, 8 insertions, 6 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 7860617c012..469f36d1fa2 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-19 Phil Edwards <pme@gcc.gnu.org>
+
+ PR libstdc++/9582
+ * include/bits/stl_alloc.h: Remove all traces of assert().
+
2003-02-18 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_sstream.h (str()): the size of the
diff --git a/libstdc++-v3/include/bits/stl_alloc.h b/libstdc++-v3/include/bits/stl_alloc.h
index 92029ea936c..fae53bd581b 100644
--- a/libstdc++-v3/include/bits/stl_alloc.h
+++ b/libstdc++-v3/include/bits/stl_alloc.h
@@ -81,7 +81,6 @@
#include <cstddef>
#include <cstdlib>
#include <cstring>
-#include <cassert>
#include <bits/functexcept.h> // For __throw_bad_alloc
#include <bits/stl_threads.h>
@@ -217,10 +216,7 @@ namespace std
/**
* @if maint
* An adaptor for an underlying allocator (_Alloc) to check the size
- * arguments for debugging. Errors are reported using assert; these
- * checks can be disabled via NDEBUG, but the space penalty is still
- * paid, therefore it is far better to just use the underlying allocator
- * by itelf when no checking is desired.
+ * arguments for debugging.
*
* "There is some evidence that this can confuse Purify." - SGI comment
*
@@ -249,7 +245,8 @@ namespace std
deallocate(void* __p, size_t __n)
{
char* __real_p = (char*)__p - (int) _S_extra;
- assert(*(size_t*)__real_p == __n);
+ if (*(size_t*)__real_p != __n)
+ abort();
_Alloc::deallocate(__real_p, __n + (int) _S_extra);
}
};