Updated mangling specs

Jason Merrill jason at cygnus.com
Thu Feb 10 17:36:15 UTC 2000


Christophe de Dinechin <ddd at cup.hp.com> writes:

> One issue that is not covered by your initial proposal is the
> mangling of static data inside functions. In particular:
> 
> - Mangling of static data in inline functions or templates
> - Mangling of strings constants in inline functions

True, though we decided last week that these can be handled by simply
adding a sequence number to the name of the function.  gcc also
includes the name of the static variable; that's not necessary for
linking, but it is for demangling.

This also applies to local classes.

Daveed, want to make a specific proposal?

> Also, to allow cross-.o file inlining, you need to extend that to
> any function (not only those explicitly marked inline.) Strictly
> speaking, this is outside the ABI, but unless there are strong
> reasons not to, I'd advocate mangling any static data, regardless of
> whether the function is tagged inline or not.

We should mangle the static data for any function that may be inlined;
which functions those are depends on the compiler.

Jason




More information about the cxx-abi-dev mailing list