This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Mangle question
- To: gcc at gcc dot gnu dot org
- Subject: Mangle question
- From: Carlo Wood <carlo at alinoe dot com>
- Date: Mon, 28 Aug 2000 17:12:52 +0200
Hiya,
I noticed that when in a mangled name a 'T' is used with an index larger
than 9, it is appended an underscore. This seems to make no sense.
Why is this done?
When this works:
>c++filt f__1AiiiiiiiiRt3bar1ZfiT9cT9T9
A::f(int, int, int, int, int, int, int, int, bar<float> &, int, bar<float> &, char, bar<float> &, bar<float> &)
Then I'd think that f__1AiiiiiiiiRt3bar1ZfiT10cT10T10 is fine too,
but instead 'T10_' is used:
>c++filt f__1AiiiiiiiiiRt3bar1ZfiT10_cT10_T10_
A::f(int, int, int, int, int, int, int, int, int, bar<float> &, int, bar<float> &, char, bar<float> &, bar<float> &)
This is a mangled name as is returned by `nm', after compiling a program.
Also c++filt demands the '_' to be there though, if we remove the '_':
>c++filt f__1AiiiiiiiiiRt3bar1ZfiT10cT10T10
A::f(int, int, int, int, int, int, int, int, int, bar<float> &, int, int, , char, int, , int, )
I suppose it works as it works, but I still wonder why :)
Does anyone know?
--
Carlo Wood <carlo@alinoe.com> -=- Jesus Loves you -=-
PS If someone knows then as a bonus I'll report two bugs in the demangler ;)
[ Heh, I mangled the demangler in the past three days - heheh ]