This is the mail archive of the
mailing list for the libstdc++ project.
New demangler in C++
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gdr at integrable-solutions dot net, bkoz at redhat dot com, libstdc++ at gcc dot gnu dot org
- Date: 24 Feb 2003 17:27:07 -0800
- Subject: 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
> | 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
- 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 at codesourcery dot com