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]

[Patch] Fix libstdc++/9582


Hi,

besides the more specific reasons put forward by Pétur
(with which I agree), I note that there are no assert
anywhere else in v3: by itself seems a good reason to
remove it from __pool_alloc, used by default in
std::allocator.

OTOH, I would rather keep a couple of assert present in the
special __debug_alloc.

Ok for trunk and 3_3?

Paolo.

/////////
2003-02-17  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9582
	* include/bits/stl_alloc.h (__pool_alloc::allocate):
	Remove assert.
diff -urN libstdc++-v3-orig/include/bits/stl_alloc.h libstdc++-v3/include/bits/stl_alloc.h
--- libstdc++-v3-orig/include/bits/stl_alloc.h	2003-02-16 12:22:29.000000000 +0100
+++ libstdc++-v3/include/bits/stl_alloc.h	2003-02-18 00:09:57.000000000 +0100
@@ -352,8 +352,6 @@
 	      __atomic_add(&_S_force_new, 1);
 	    else
 	      __atomic_add(&_S_force_new, -1);
-	    // Trust but verify...
-	    assert(_S_force_new != 0);
 	  }
 
 	if ((__n > (size_t) _MAX_BYTES) || (_S_force_new > 0))

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