[c++] Another question about demangler output
Gabriel Dos Reis
gdr@integrable-solutions.net
Sun Dec 7 03:00:00 GMT 2003
Daniel Jacobowitz <drow@mvista.com> writes:
| One symbol generated by this program is _ZN2BBIiEcvPFivEEv, which demangles
| as:
| BB<int>::operator int (*)()()
|
| But that output is quite annoying for me, because it's nothing like legal
| C++, as far as I have been able to tell.
Yep, that is not valid C++.
[...]
| same time we _can't_ differentiate between them. I've found no reasonable
| way for it to figure out what "A::operator int (*)()()" means.
It is not C++. You have to go through a type-alias indirection.
| Am I right that this can't be expressed in C++ without using an intermediate
| type? If I am right, I'm not sure what to do. If I'm wrong, we can correct
| the demangler.
I think the ABI rules for mangling and demangling is too
schizophrenic. At one point, it is token-oriented and at another
point it is not. Another level of difficulty is that typedef-name have
no linkage. Did they have internal/external, I would say just go with
the intermediate type-alias name; but you can't :-(
-- Gaby
More information about the Gcc
mailing list