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: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2007 01:42:30 -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 #22 from pcarlini at suse dot de 2007-01-30 01:42 -------
(In reply to comment #21)
> I suspect Andrew Pinski's point might be that what() could return a
> string that represents the name of the most derived type of the
> exception. But, nothing so far forces to do that. A reasonable
> definition is to what Paolo suggest, with clear documentation (that
> mentions this).
Agreed. Gaby, do you have any strong opinion about std::exception itself? In my
current patch draft I'm leaving it alone, but in principle we could change also
its what() to return "std::exception" instead of typeid(*this).name(). In other
terms, I'm not sure whether your Comment #13 contrary to the mangled typeid
applies also to the base std::exception...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14493