 |
|
|
|
Actions
|
|
[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
Re: [cxx-abi-dev] A mangling ambiguity
- To: "J. Stephen Adamczyk" <jsa@xxxxxxx>, cxx-abi-dev@xxxxxxxxxxxxxxxx
- Subject: Re: [cxx-abi-dev] A mangling ambiguity
- From: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
- Date: Tue, 03 Dec 2002 21:31:37 -0800
--On Tuesday, December 03, 2002 02:25:59 PM -0500 "J. Stephen Adamczyk"
<jsa@xxxxxxx> wrote:
Here's an interesting case that shows an ambiguity problem with name
mangling:
template <class T> struct A {
template <class U> operator U() { return 0; }
};
int main() {
A<float> a;
int i = a;
}
The mangled name for the conversion function is
_ZN1AIfEcvT_IiEEv
^problem here
The key question is:
Is this just an ambiguity when demangling, or are there actually two
distinct entities that could end up with the same name?
If the latter, we have to do something; if the former, we can probably
live with it. I can't quite figure out the answer; conversion functions
are a special case, and they are always members, so it may be that
everything after "cv" and before the next non-nested "E" must always
be a type, and then (optionally) some template arguments.
For example, in this case, it can't be a template template parameter
because then you hit the non-nested "E" without having gotten to the
argument that correspond to the template template parameter.
--
Mark Mitchell mark@xxxxxxxxxxxxxxxx
CodeSourcery, LLC http://www.codesourcery.com
|
|