Getting Apple's libstdc++ debug mode into the FSF tree

Doug Gregor
Wed Jul 16 17:56:00 GMT 2003

On Wednesday, July 16, 2003, at 10:43AM, Matt Austern wrote:
> I agree with you that -lstdc++-debug and -gc++lib are a little too 
> cute.  I like -debug, and I like -debug=c++ even better because it's 
> more specific.  But I'm also imagining the future of debug modes: 
> someday we might want to have things like a debug mode for the C 
> library, or a debug mode that catches array overflows in builtin 
> arrays, and so on.  Do we think we want one switch to control all of 
> those things, or do we thing we should give users fine-grain control?  
> If the latter, then we shouldn't choose an overly general name for a 
> specific case.  So maybe -debug=libc++, to make it absolutely explicit 
> what this flag does?
> 			--Matt

I don't like -debug=c++, because it says nothing about the library. 
-debug=c++lib is more precise, and not too much more typing.

The patch I'm testing now allows:


where <checks> is a comma-separated list of individual checking types, 
consisting of:

	c++lib	libstdc++ debug mode
	all		everything we know how to check (silly for now; might not be so 
silly later)

Also, -debug is a synonym for "-debug=all".

We could also pull the concept-checking macro here, and add:

	concepts	Define _GLIBCXX_CONCEPT_CHECKS to do concept-checking in the 

Then just using "-debug" will enable concept checking (since we're 
being strict about everything else in the library, why not?).


More information about the Libstdc++ mailing list