This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Where is docs for typeid(x).name()?


Ian Lance Taylor skrev:
"Lee Rhodes" <lee@rhoba.com> writes:

I have figured out by experimenting that typeid(x).name() produces:
'c' if x is type char
'h' if x is type unsigned char
'i' if x is type int
'j' if x is type unsigned int
...and so on.

Where can I find the full list of such symbolic representations of internal
types?

I believe they are mangled type names. The mangling is described in section 5.1.5 here: http://www.codesourcery.com/cxx-abi/abi.html#mangling

Ian



You can also use c++filt (included in binutils) to demangle names. Take a look at the source if you want to implement something similar into your application.


// David Sveningsson


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]