C++ demangler horrors
H. J. Lu
hjl@lucon.org
Thu Jun 26 19:01:00 GMT 2003
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.
More information about the Gcc
mailing list