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

New demangler in C++


> | I think it's a mistake to do a new implementation in C++.

> I beg to differ.

> | I think that the demangler should be written in C as an independent
> | module so that it can be used in programs that are not written in
C++.
> | And I think that having two demanglers just makes things worse; now
> | they can be out of synch in all sorts of weird ways.

> While I recognize of the out-of-sync danger of having two independent
> implementations, it is a mistake to force a C implementation of the
> demangler on every body.  This message is not a religious matter.

I guess what I think is this:

- The demangler ought to be able to be linked into GDB, binutils, source
  browsers, etc.

- Those applications presently use no C++.

I think that the maintainers could possibly be persuaded to link in one
C++ .o file -- but probably not libstdc++.

So, if the file were written in C++ -- but didn't use <string> -- I'd
probably resist less.  You're right that if it's written in C++, but
doesn't use C++ library stuff, that it could present a C interface and
that would be fine.

The key point is that I think it's a big mistake to have two
demanglers.  If we're going to write a new one, we should make sure that
it can replace the old one, not just get added to the mix.

-- 
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery dot com


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