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: Next round of new demangler patches


On Sun, Dec 07, 2003 at 01:01:14PM +0100, Gabriel Dos Reis wrote:
> mec.gnu@mindspring.com (Michael Elizabeth Chastain) writes:
> 
> | (1) std::string::~string()
> | 
> |     This is bad because it's not legal C++.  Try compiling the appended
> |     program with a typedef'd template.  I'm really opposed to emitting
> |     illegal C++ in a programmatic interface.
> 
> I agree that std::string::~string() is ill-formed (I just did my
> homework I should have done), however your last sentence scaries me
> (no offense intended).  How do you handle the various examples that
> have been posted concerning convesion functions (and I can also cook
> ones with p->~int() involved)?

Right now, badly!  That's part of the problem I'm trying to fix.

For constructors, the current handling usually involves finding the
mangled name in the debug info and checking if that's a constructor. 
That's gross, although obviously there are some things here I didn't
know about legal specifiers for constructors... ew.

For operators it involved a simple string operation.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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