This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Really obscure C++ mangling error with -fnew-abi
- To: mark at codesourcery dot com
- Subject: Re: Really obscure C++ mangling error with -fnew-abi
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Mon, 3 Jul 2000 00:14:16 +0200
- CC: gcc-bugs at gcc dot gnu dot org
- References: <20000630172927.I503@perlsupport.com> <20000702115901E.mitchell@codesourcery.com>
> I fixed this bug with the following patch. After the patch, this:
>
> 00000000 W _ZSt26__uninitialized_fill_n_auxIPSsjSsET_S1_T0_RKT1_5_BoolILb0EE
>
> is the only output from `nm' containing uninitialized_fill_n_aux,
> which is a good sign. This demangles to:
>
> std::string*
> std::__uninitialized_fill_n_aux<std::string*, unsigned, std::string>
> (std::string*, unsigned, const std::string&, _Bool<false>)
>
> which looks right to me.
I'm having problems with the numbering of things (the S1_ part in
particular); I'd appreciate if anybody could correct me. Building up
the compression dictionary, I get
std:: - predefined entry, not added
std::__uninitialized_fill_n_aux - function name, not added
std::string - predefined entry
std::string* - S_ (also first template parameter, T_)
unsigned - basic type, not added
std::string - predefined entry
std::__u..<types> - function name, ignored, or S0_?
return type - T_, according to definition, added as S1_?
Now, we are up the part of IPSsjSsET_
S1_ clearly is intended as a back-reference to T_, as the first parameter
is the same as the return type.
However, the rationale for not adding the function name to the
dictionary (*) surely applies not only to the name itself (which would
be __uninitialized_fill_n_aux, but also to all components which it is
part of, ie. std::__un... and std::__un...<types>). So I can't see
what S0_ would be in this scenario.
Any enlightenment appreciated,
Martin
(*) It is not possible that there is any back-reference to this name,
so it does not need to be added.