This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: demengler in libstdc++ is changed


On Fri, Nov 14, 2003 at 12:53:04PM -0800, Matt Austern wrote:
> On Nov 14, 2003, at 7:59 AM, H. J. Lu wrote:
> 
> >On Fri, Nov 14, 2003 at 02:28:33AM +0100, Carlo Wood wrote:
> >>On Thu, Nov 13, 2003 at 07:36:56PM -0600, Chris Lattner wrote:
> >>>
> >>>>BTW, is anyone working on fixing the demangler in libiberty? There
> >>>>is a replacement in C++.
> >>>
> >>>If it's a problem that it is written in C++, you could always just 
> >>>compile
> >>>it with the LLVM G++ compiler to C.  Include _that_ in libiberty...
> >>>problem solved! :) :)
> >>
> >>We already provided a library with C linkage (that does not need
> >>libstdc++).  But the libiberty people don't want to need a C++
> >>compiler to compile libiberty.
> >>
> >
> >My main question is, should 2 demanglers have the same correct output
> >on the same input? If the answer is YES, I think the testsuites should
> >be modified to enforce that. If the answer is NO, that is a regression
> >from gcc 3.2/3.3.
> 
> So far nobody has defended a NO answer.  So I will.  I don't think
> there is any reason to expect that two demanglers should produce
> the same character-by-character output.  I expect that both demanglers
> should produce correct output, but there are multiple correct ways to
> write some constructs in C++.  Users should not care which one is used
> (so long as the output is clear), and the output of demanglers should
> only be used for inspection by humans.  Programs that want to
> manipulate information about C++ programs should use some other
> mechanism, such as mangled names or parse trees.
> 

But why do they have to be different? What should the criteria of
demangler output in gcc be? Anything goes as long as it is correct?

FYI, GNU linker uses demangler in symbol version script for human
readable names.

H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]