C++ name mangling for local entities
Geoffrey Keating
geoffk@apple.com
Fri Oct 20 04:17:00 GMT 2006
On 19/10/2006, at 3:04 PM, Ian Lance Taylor wrote:
> gkeating@apple.com (Geoffrey Keating) writes:
>
>> For GCC, I've found it necessary to have a way to name local (that
>> is,
>> namespace-scope 'static') variables and functions which allows more
>> than one such symbol to be present and have distinct mangled names.
>
> Out of curiousity: why start the name with "_Z" at all? If you don't
> start it with "_Z", then you don't have to worry about the standard
> name mangling.
That's true; but then I have to decide what to start it with ('_Y'
would not be a good choice, nor would '_A', and I'm hesitant to try
'_L'), explain to the demanglers that they should demangle some things
that don't start with 'Z', and explain to the manglers that they can't
decide on the prefix until they've created a mangled version of the
entire rest of the name so that they know whether they needed to use a
local-source-name.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2462 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20061020/b83b51a3/attachment.p7s>
More information about the Gcc
mailing list