This is the mail archive of the gcc@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: C++ name mangling for local entities


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.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


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