[Bug libstdc++/14493] No std::bad_alloc::what() const

pme at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Mar 9 19:48:00 GMT 2004


------- Additional Comments From pme at gcc dot gnu dot org  2004-03-09 19:48 -------
(In reply to comment #5)
> It appears to me that the original reporter wanted what() to return
> an "intelligible error message" a la icc's "bad allocation", rather
> than "St9bad_alloc"  (which does communicate the same information but
> in a more cryptic fashion).
> 
> I do think there should be a place in the standard library for nice 
> friendly names for exceptions (think strerror()), but I don't know 
> if what() is that place.

Slap a _Z on that thing and we could demangle it automatically.  The
problems with doing so are that the demangling routines are linked in
when they otherwise wouldn't be (so goes the argument, but I haven't
verified it myself).

Personally, I feel __cxa_demangler should just be present, full stop.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14493



More information about the Gcc-bugs mailing list