runtime demangler API

Alex Samuel samuel at codesourcery.com
Fri Aug 25 21:08:10 UTC 2000


There's something somewhat confusing about the runtime API to the
demangler (abi::__cxa_demangle).  Presumably, the main use of this
function will be to mangle type names from typeinfo structures.  Note
that these aren't quite proper mangled names according to the grammar,
i.e. not productions of <mangled-name>, but rather productions of
<type>.  Particularly, they don't start with _Z.

This leaves open the confusion that, for instance, if I call
__cxa_demangle with the input "i", do I mean the function/variable
`extern "C" i' or the type `int'? 

Does anyone anticipate that this will be a problem?  In any case, the
specification should probably address what the correct behaviour here
is.

Regards
Alex Samuel
CodeSourcery LLC




More information about the cxx-abi-dev mailing list