This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [google][4.8] Add more inexpensive debug checks to vector, bitvector, deque
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: Paul Pluzhnikov <ppluzhnikov at google dot com>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 6 Jan 2014 20:58:00 +0000
- Subject: Re: [google][4.8] Add more inexpensive debug checks to vector, bitvector, deque
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobOrbSCSUJh8qGZ-uLjrZ5ZwX2ctF4529Ff3vgw6E3CGVw at mail dot gmail dot com> <52CB1579 dot 7070906 at gmail dot com>
On 6 January 2014 20:43, François Dumont wrote:
>
> For my information, all those checks are already done in gcc
> _GLIBCXX_DEBUG mode, why duplicating those in normal mode with a dedicated
> macro ? Is it that you only want to keep debug checks that have a constant
> time cost ?
The reasons have been explained by Paul on this list in the past.
Debug Mode is binary incompatible with normal mode, so cannot be used
when it is not possible to recompile every file and library in a
program. Debug Mode breaks the complexity guarantees of the standard
containers and algorithms.
The inexpensive checks on the Google branch do not alter the ABI or
performance guarantees. I am interested in adding more of those
checks to the (non-Debug Mode) library.