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


Ian Lance Taylor <iant@google.com> writes:

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

To answer my own question: yes.

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

No, I completely confused what(), from the exception class, with
name() from the type_info class.  Sorry about that.

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

Yes.

-- Gaby


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