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: How to get debug mode version of libstdc++ when compiling GCC


On Thu, Jul 22, 2004 at 05:04:05PM +0200, Pit Cuppens wrote:

> Dear all,
> 
> I have recently heard that libstdc++ comes
> with assertion checks, and that one can
> enable them using the "-D_GLIBCXX_DEBUG"
> comiler flag. For instance, compiling
> 
> #include <vector>
> 
> int main(int,char **) {
>   std::vector<int> v;
>   v[3] = 2;
> }
> 
> with -D_GLIBCXX_DEBUG would result in a
> runtime error mesage. Wonderful!

All correct, except that the debug mode was added in GCC 3.4

I'll update the debug.html page to say so.

jon

-- 
"Sell your cleverness and buy bewilderment:
 Cleverness is mere opinion, bewilderment is intuition."
	- Jalal-uddin Rumi


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