FYI: A new C++ demangler

Frank Ch. Eigler fche@redhat.com
Thu Jul 10 22:58:00 GMT 2003


cagney wrote:

> [...]
> > Could someone fix the old demangler, or write a new one in
> > plain C (or re-write the C++ one in C)?  Pretty please?
> 
> Yes.  There's no reason for the underlying demangler algorithm to be
> implemented in vanila ISO C 90, and then wrap it for the C++ side.
> [...]

You might be accused of dogmatic monolingualism if you don't accept
the notion that some such code may be more naturally expressed in a
higher level language -- that could be one such reason.  Another
reason of course is the fact that it is already done and working:
rewriting costs new effort.

(Note that I'm not asserting that the former reason applies strongly
here; libstdc++-v3/include/bits/demangle.h for example doesn't seem to
rely much on the C++ language's extra capabilities.)

- FChE



More information about the Binutils mailing list