This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/14493] std::bad_alloc::what() does not explain what happened
- From: "gdr at cs dot tamu dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2007 03:53:19 -0000
- Subject: [Bug libstdc++/14493] std::bad_alloc::what() does not explain what happened
- References: <bug-14493-5724@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #25 from gdr at cs dot tamu dot edu 2007-01-30 03:53 -------
Subject: Re: std::bad_alloc::what() does not explain what happened
"pcarlini at suse dot de" <gcc-bugzilla@gcc.gnu.org> writes:
| > However, the use of typeid is very convenient in the sense that we
| > have to defined what() only once. Now, if we change that definition
| > in std::exception, it means that we should revisit all other exception
| > classes, such as std::runtime_error, etc.
|
| I see, but I don't think we have to do much, because the other exception
| classes, provided in <stdexcept>, per the standard requirements are already
| overriding what() to return _M_msg.c_str(). Thus, I'm coming to the
conclusion
| that we should consistently change std::exception too and be done with it.
You're right. I agree with your analysis.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14493