This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ 2.95 typeinfo::name()
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: g++ 2.95 typeinfo::name()
- From: <rssh at gvinpin dot grad dot kiev dot ua>
- Date: Mon, 22 Jan 2001 14:13:15 +0200 (EET)
- cc: "Kellogg, Oliver" <Oliver dot Kellogg at vs dot dasa dot de>, "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
On 22 Jan 2001, Alexandre Oliva wrote:
> On Jan 22, 2001, "Kellogg, Oliver" <Oliver.Kellogg@vs.dasa.de> wrote:
>
> > Is it correct that the typeinfo::name() method of g++-2.95
> > returns a number, i.e. the length of following characters,
> > prefixed to the actual name?
>
> Yep. It would also be correct if it just returned an empty string for
> all types.
No. must be true:
typeof(x)==typeof(y) <=> typeof(x).name equal typeof(y).name()
>
> GCC chooses to return the mangled type name, because it is unique and
> relatively compact, instead of returning a printable canonicalized
> type name. But this might be changed at any time, and you probably
> shouldn't rely on it.
>
> --
> Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
> Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
> CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
> Free Software Evangelist *Please* write to mailing lists, not to me
>