This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: STL debug mode
- From: Phil Edwards <phil at jaj dot com>
- To: "Peter Nordlund L (ERA)" <Peter dot L dot Nordlund at era dot ericsson dot se>
- Cc: "'libstdc++ at gcc dot gnu dot org'" <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 19 Apr 2002 00:50:31 -0400
- Subject: Re: STL debug mode
- References: <6526481A986CD51189C30002A52C969702CE4FE7@Esealnt862.al.sw.ericsson.se>
On Thu, Apr 18, 2002 at 11:00:02AM +0200, Peter Nordlund L (ERA) wrote:
> Hi all,
>
> I wonder if there is a debug mode a la STLPort
> http://www.stlport.org/doc/debug_mode.html
>
> available for libstdc++?
Not at runtime, not like STLport, anyway. Take a look at
http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html
Two that might interest you are --enable-debug and --enable-concept-checks.
The first builds the library with maximal debug information and minimum
optimizations. The second performs compile-time (not runtime) checks of
your STL template instantiations, which often notices the same bugs that
STLport's debug mode notices, but earlier.
> If this feature is not available, is there any interest in implementing it?
A massively-slow, massively-safe runtime is something I wouldn't mind
providing, but nobody's come up with a good method of implementing it yet.
We prefer to do as many checks as we can during compilation; that way we can
have them on all the time without penalizing your generated program speed.
Phil
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams