FYI: A new C++ demangler

Nathanael Nerode neroden@twcny.rr.com
Wed Jul 16 17:12:00 GMT 2003


Alexandre Oliva wrote:
> On Jul 15, 2003, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
>>Yes.  Apparently Nathanael doesn't seem to understand that C++
>>can be used productively for system programming.
No, I understand that.  Why do people keep missing the point?  Let me 
try again.

Adding the C++ demangler to libiberty adds a new build requirement, C++, 
to anything which uses libiberty.  DJ, the libiberty maintainer, has 
said that this is not OK with him because it does not satisfy the goals 
of libiberty.

HJ's plan of having two versions of libiberty, one with the 'new' 
demangler and one with the 'old' demangler, selected magically at 
build-time, is a very, very bad idea because it's confusing.  I don't 
care whether they're link-compatible; it still means two versions of 
libiberty pretending to be the same version.  It's designed to cause 
confusion and untraceable bug reports.

Or if the demangler is outside libiberty, it means GDB (and anything 
else using the new demangler) requires C++ to build, which is again 
*fine with me*.  But apparently it's *not* acceptable to the GDB people. 
  Go talk to them about whether "C++ can be used productively for system 
programming", if you like.

> I don't think the issue is about using C++ for system programming.
> The issue is about having to force every user of libiberty to start
> linking programs that link with libiberty using $(CXX) instead of just
> $(CC).  This would be a very incompatible and, IMHO, undesirable
> change.
It's not just linking, it's building as well.  See above.

If adding C++ as a build requirement is considered acceptable by all the 
projects using libiberty (which includes stuff outside gcc/src), then 
the C++ demangler can be put in libiberty.

If adding C++ as a build requirement is considered acceptable by all the 
projects in gcc/src which want the new demangler, then the C++ demangler 
can be put in as a separate directory.

If adding C++ as a build requirement is *not* considered acceptable by 
any *one* of them, we can't.  It's as simple as that, and it's nothing 
to do with me.  Feel free to convince the projects in GCC and SRC that 
they want to add C++ as a build requirement.

The only thing I am *personally* strongly against is the stupid scheme 
for silently building different versions of libiberty (or, indeed, GDB 
or binutils) under the same name depending on the build environment.  I 
even said that multiple versions would be fine by me if they were 
controlled by an explicit option, rather than implicit characteristics 
of the build environment.

--Nathanael



More information about the Binutils mailing list