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]

Re: Debug Mode Lite


On 16 June 2014 08:30, Jonathan Wakely wrote:
> I think we should enable _GLIBCXX_ASSERT checks under more conditions,
> e.g. if the user defines _GLIBCXX_DEBUG_LITE, to enable all low-cost
> debug checks that have no ABI impact, such as range checks in vectors,
> non-null checks dereferencing smart pointers.
>
> The full _GLIBCXX_DEBUG mode alters too much and requires rebuilding
> all relevant objects.
>
> A lot of our existing _GLIBCXX_ASSERT checks are cheap anyway, the
> ones that aren't should be moved to a new macro that's only enable by
> the full _GLIBCXX_DEBUG macro. There are some interesting additional
> checks in the Google svn branch that should be turned on by the "lite"
> mode.
>
> (Please suggest a better name, I hate the word "Lite" :-)

Here's a patch to show what I mean (this isn't tested and doesn't
disable any more expensive checks).

Attachment: patch.txt
Description: Text document


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