This is the mail archive of the gcc-patches@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]

Re: [PATCH][RFC] Malloc-less demangler interface


Gabriel Dos Reis <gdr@cs.tamu.edu> writes:

> Paolo Carlini <pcarlini@suse.de> writes:
> 
> | PS: sorry for having stated incorrectly the problem at issue in the
> | PR: isn't about the standard exception classes (available through
> | <stdexcept>) and constrained in the return value of what(). Instead,
> | is all about bad_alloc, bad_cast, etc, where the null terminated byte
> | string is implementation-defined (and could well be demangled). In
> | short, is a purely libsupc++ issue.
> 
> I believe the ABI GCC follows clearly states that what() should return
> the mangled name.  Do I misunderstand?

I just looked, and I don't see that in the C++ ABI document at
codesourcery.com.  I don't see any mention of what() at all.  Is there
a different ABI that describes this?

If we are permitted to return a general string from
std::bad_alloc::what(), then it seems that we could trivially create
that function to return whatever string we find convenient.

Ian


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