This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ demangler horrors
- From: Phil Edwards <phil at jaj dot com>
- To: Nathanael Nerode <neroden at twcny dot rr dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 26 Jun 2003 14:49:26 -0400
- Subject: Re: C++ demangler horrors
- References: <20030626170806.GA1119@doctormoo>
On Thu, Jun 26, 2003 at 01:08:06PM -0400, Nathanael Nerode wrote:
> We want a working C++ demangler which is not dependent on libstdc++ in
> any way.
>
> I believe this is the bottom line.
Or close to the bottom, at least.
Personally, I'd like to work towards a day when we can use C++ as part of
the development toolchain. Yes, it will involve a larger "bootstrap" loop,
but it would only have to be done /once/.
Anyhow.
Rewriting Carlo's demangler to not use C++ can be politely described
as non-trivial. It's not just a matter of changing the code to
use, say, libiberty's dyn_string instead of std::string, or using
obstack/hashtab/some-expandable-container instead of std::vector.
The design itself would have to change, which would mean, effectively,
that we'd no longer be using Carlo's demangler.
Phil
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams