Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!olivea!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.lang.c++ Subject: Re: c++ name mangler sought Message-ID: <650@taumet.com> Date: 4 Apr 91 00:27:19 GMT References: <5165@atexnet.UUCP> <71574@microsoft.UUCP> Distribution: usa Organization: Taumetric Corporation, San Diego Lines: 24 robertk@lotatg.lotus.com (Robert Krajewski) writes: >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. Apart from extensions which Robert mentions, some other changes may be needed. The cfront scheme assumes the linker distinguishes upper and lower case, which not all linkers do (notably VMS). Not all linkers support long names, and some mangled function names can become very long indeed. Sometimes the fully-mangled name must be hashed to a shorter version. The cfront scheme produces names which are legal C identifiers. Shorter mangled names can be produced if the linker allows characters in names which are not legal in C (or C++) identifiers. Finally, as has been pointed out elsewhere (by me, among others), name mangling is an implementation detail. If the linker can recognize type information passed by the compiler, name mangling might not be necessary at all. -- Steve Clamage, TauMetric Corp, steve@taumet.com