Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!uunet!lotus!lotus.com!robertk From: robertk@lotatg.lotus.com (Robert Krajewski) Newsgroups: comp.lang.c++ Subject: Re: c++ name mangler sought Message-ID: Date: 2 Apr 91 22:39:00 GMT References: <5165@atexnet.UUCP> <71574@microsoft.UUCP> Sender: news@lotus.com Distribution: usa Organization: /homes/robertk/.organization Lines: 21 In-Reply-To: jimad@microsoft.UUCP's message of 28 Mar 91 20:26:51 GMT In article <71574@microsoft.UUCP> jimad@microsoft.UUCP (Jim ADCOCK) writes: In article <5165@atexnet.UUCP> sidlo@skinner.epps.kodak.com (John Sidlo) writes: |Does anyone know where I can find a c++ name mangler? This program would |take a string like "x::f(int)" and produce the corresponding typesafe |version "f__1xFi", for example. (The ARM talks about this in sect 7.2.1c). Name mangling is not "c++", but rather is implementation dependent. Which compiler do you want a name mangler for? Actually, at least one of the C++ books lays out the cfront name mangling scheme, and says it should be followed by other implementations so that C++ tool writers won't have so much (arbitrary) work to do. Of course, some implementations must extend the mangling scheme because the environment demands it: for example, 16:16 (segmented) Intel architectures need the NEAR/FAR pointer distinction MPW provides a little library function for demangling char *'s. Other development environments ought to provide such a service, too. (Preferably with a standard name and interface.)