This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/23888] should debug mode throw instead of assert?
- From: "jwakely dot gcc at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Mar 2008 13:41:17 -0000
- Subject: [Bug libstdc++/23888] should debug mode throw instead of assert?
- References: <bug-23888-365@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jwakely dot gcc at gmail dot com 2008-03-08 13:41 -------
(In reply to comment #2)
> Finding this spot,
> however, is the sole purpose of offering the debug mode libstdc++.
I agree with every word of Wolfgang's, but this is the key point.
User code would never want to catch and handle debug mode exceptions, what
would the program do, log it and carry on? "We have encountered this bug 4798
times today." :)
Stack unwinding due to an exception could destroy all the evidence of the
failed precondition, making it much harder to track down the problem. A
coredump is perfect.
The only advantage I see is for the testsuite, but the inconvenience to users
is major.
--
jwakely dot gcc at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jwakely dot gcc at gmail dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23888