This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] |
On 09/09/15 14:54 +0100, Jonathan Wakely wrote:
On 08/09/15 21:52 +0200, François Dumont wrote:Very good approach, I will start moving light checks from _GLIBCXX_DEBUG implementation to normal one then.Great, thanks. I *think* my patch got most of the lightweight checks already. We could maybe include the irreflexivity checks, although it does change the number of calls to the comparison function, which is not allowed for some algorithms. I'll commit my patch today.
I've committed the attached patch to trunk. It's the same as the original one except for the tweaks to the docs in response to Daniel's comment, and some whitespace changes in <valarray>. I haven't made _FORTIFY_SOURCE enable these yet. Tested powerpc64le-linux. Here are some patches we should consider merging from the google branches: https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00008.html https://gcc.gnu.org/ml/gcc-patches/2014-01/msg00215.html https://gcc.gnu.org/ml/gcc-patches/2013-09/msg01837.html https://gcc.gnu.org/ml/gcc-patches/2013-05/msg01817.html https://gcc.gnu.org/ml/gcc-patches/2013-01/msg01074.html https://gcc.gnu.org/ml/gcc-patches/2013-01/msg01186.html (The last two probably only work for unoptimized builds, but that may still be useful). Those are just ones I had in my mailbox, we should search for __google_stl to find them all. Each should be considered individually, I know I disliked some of the early patches when I first looked at them years ago. Discussion about enabling these checks automatically: https://gcc.gnu.org/ml/gcc-paetches/2013-05/msg01386.html https://gcc.gnu.org/ml/gcc-patches/2013-06/msg00211.html I'd forgotten about Oleg's suggestion of _GLIBCXX_DEBUG_LEVEL_N: https://gcc.gnu.org/ml/libstdc++/2014-06/msg00107.html ANother option would be to support different checks depending on the value of _GLIBCXX_ASSERTIONS=N, but I think for now we should keep it simple and not complicate things like that. If these checks are light enough then I think we only need two levels: cheap assertions and full debug mode.
Attachment:
patch.txt.bz2
Description: BZip2 compressed data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |