This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: type_info::name question
- To: egcs at cygnus dot com
- Subject: Re: type_info::name question
- From: Ryszard Kabatek <rysio at rumcajs dot chemie dot uni-halle dot de>
- Date: Tue, 22 Sep 1998 10:25:49 +0200 (CEST)
- Reply-To: kabatek at chemie dot uni-halle dot de
Jason Merrill wrote:
> >>>>> Thomas Kunert writes:
>
> > Alexandre Oliva wrote:
> >>
> >> Ryszard Kabatek writes:
> >>
> >> > Is there any possibility to get the class name from
> >> > type_info::name?
> >>
> >> You might run `c++filt' and feed it the result of type_info::name(),
> >> but you may prefer to create a library containing the unmangler
> >> functions from c++filt and link your program with it.
>
> > IMHO, type_info::name isn't useful at all if it returns some cryptic
> > string. Is there some intention behind that behavior or is it just
> > the shortest way towards conformance?
>
> Two reasons:
>
> 1) The mangled name is shorter, so the RTTI overhead is lower.
> 2) The mangled name is unique.
>
> Jason
Yes, the mangled name is `very' unique.
It may change in the next egcs version.
What value do return other comilers for type_info::name?
Ryszard Kabatek
---
Martin-Luther University Halle-Wittenberg
Department of Physical Chemistry
Geusaer Str. 88, 06217 Merseburg, Germany
Tel. +49 3461 46 2487 Fax. +49 3461 46 2129