This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ demangler horrors
On Thu, Jun 26, 2003 at 02:59:53PM -0400, Kaveh R. Ghazi wrote:
> > From: "H. J. Lu" <hjl@lucon.org>
> >
> > On Thu, Jun 26, 2003 at 02:48:28PM -0400, Kaveh R. Ghazi wrote:
> > > > 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.
> > > >
> > > > You have to elaborate. My demangler patch requires a C++ compiler to
> > > > build, but not a C++ compiler to use. I don't see there is much
> > > > drawback. Besides, it will fall back to the old demangler if there is
> > > > no suitable C++ compiler.
> > > > H.J.
> > >
> > > FWIW, g++ (cc1plus) on mainline can be built with any ISO C compiler.
> > > I.e. you could build cc1plus in stage1 and use that to build the C++
> > > demangler.
> > >
> > > As long as you don't need libstdc++ (or exceptions which also require
> > > the target support library) then you should be fine. Ie. you can use
> > > all other C++ language features like classes, ctors/dtors etc. If the
> > > C++ demangler can restrict itself to these features you should be able
> > > to build it in stage1 after building cc1plus.
> > >
> > > Does this help?
> > >
> >
> > It uses <vector> and <string>.
> > H.J.
>
> Can't you write mini replacements?
>
The one compiled in libiberty use <dynstring>, not <string>. I tried
mini <vector> once. But it seems not a small project, considering
all the <vector> features the demengler uses. I think my time is
better spent somewhere else.
H.J.