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


"H. J. Lu" <hjl@lucon.org> writes:

[...]

| > 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?

They do only have to agree semantically.

| 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.

I think there should be a tool on top of the demangler in order to
cope with semantic isomorphism like "const int" == "int const".
I'm not convinced the output of the demangler  should be defined at
character-precision level.

-- Gaby


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