This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] libstdc++/9582
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- To: libstdc++ at gcc dot gnu dot org
- Cc: pcarlini at unitus dot it
- Date: Tue, 18 Feb 2003 14:33:09 -0600 (CST)
- Subject: Re: [v3] libstdc++/9582
- Organization: Networks and Infrastructure Lab (IL02/2240), Motorola Labs
In article <3E52131A.7000404@unitus.it> you write:
> PR libstdc++/9582
> * include/bits/stl_alloc.h (__pool_alloc::allocate): Remove assert.
> - // Trust but verify...
> - assert(_S_force_new != 0);
Thanks Paolo, that was my comment and my particular assert(). The PR
raised an interesting QoI point: "I think that the contents of
standard headers (other than cassert) should not depend on the macro
NDEBUG, and cassert should not be included by other standard headers."
Should __debug_alloc<> (which contains the same ODR violation) be
documented and changed to unconditionally abort() when a size mismatch
is detected? This way we can remove the <cassert> inclusion entirely.
Regards,
Loren