This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/14493] std::bad_alloc::what() does not explain what happened



------- 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


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