Demangling broken (was: Re: [PATCH] Demangler woes with current CVS and type names)

Jason Merrill jason@redhat.com
Fri Feb 1 14:55:00 GMT 2002


>>>>> "Phil" == Phil Edwards <phil@jaj.com> writes:

> On Fri, Feb 01, 2002 at 07:50:10PM +0000, Jason Merrill wrote:
>> >>>>> "H" == H J Lu <hjl@lucon.org> writes:
>> 
>> > 	(main): Set cplus_demangle_v3_p to cplus_demangle_v3_type for
>> > 	gnu_v3_demangling:
>> 
>> Not OK.  This will wreak the same havoc that Phil's original change did,
>> just only with -s gnu-v3.  The type-handling behavior should be limited to
>> command line arguments, it should never be active in filter mode.

> What if HJ's patch were to turn on type demangling by default only when
> the standalone c++filt were being built, and leave the current semantics
> stand for the library?  (Is that what you're saying?)

No.  I'm saying that it's OK for 'c++filt d' to say 'double', because
giving a name on the command line makes it explicit that we think it's a
mangled name, so it's appropriate to try hard to demangle it.

However, 'echo d|c++filt' should always say 'd', or you get very strange
results from trying to read assembly output with c++filt.

With HJ's patch, 'echo d|c++filt -s gnu-v3' would say 'double', which is
undesirable.

Jason



More information about the Binutils mailing list