RFA: Please review the new C++ demangler patch

H. J. Lu hjl@lucon.org
Thu Jun 26 01:01:00 GMT 2003


On Wed, Jun 25, 2003 at 03:05:38PM -0700, Zack Weinberg wrote:
> "H. J. Lu" <hjl@lucon.org> writes:
> 
> >> >> I don't understand what you mean by "remove the old one".
> >> >
> >> > ar -d ..../libiberty.a cp-demangle.o
> >> > ar rc ..../libiberty.a demangle.o
> >> 
> >> Ick.  There must be a better way.
> >
> > Any suggestions are welcome.
> 
> ... build it as part of libiberty, after libstdc++, like I've been
> trying to tell you?

I don't want to force the change of the build order between libiberty
and libstdc++ in this patch. It may cause other problems. Besides a
separate demangler directory/library is eaiser to maintain. 

> 
> and then we can GET RID OF the old demangler that doesn't work?

Some people may not have C++ compiler. They can still use the old one.
libiberty has never required a C++ compiler to compile.

> 
> >> > The one in libiberty only supports the C interface without C++ support,
> >> > like RTTI and exeception. Also it uses its own allocator and dynstring
> >> > so that it can be used as a C function. Otherwise, you can put it in
> >> > libiberty. But you don't want to do that in libstdc++.
> >> 
> >> Better we break up the demangler into "libiberty only" and "libstdc++
> >> extra functionality", then.
> >
> > We have done that, but in .o files. You can have use both the demangler
> > in libiberty and the one in libstdc++ in the same program.
> 
> Cleaner to do it at the source level, I think.

It is very hard.


H.J.



More information about the Gcc mailing list