This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [c++] Another question about demangler output
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 07 Dec 2003 03:52:16 +0100
- Subject: Re: [c++] Another question about demangler output
- Organization: Integrable Solutions
- References: <20031206235918.GA32439@nevyn.them.org>
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