Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!janus.Berkeley.EDU!jbuck From: jbuck@janus.Berkeley.EDU (Joe Buck) Newsgroups: comp.lang.c++ Subject: Re: c++ name mangler sought Message-ID: <41587@ucbvax.BERKELEY.EDU> Date: 4 Apr 91 03:00:16 GMT References: <41560@ucbvax.BERKELEY.EDU> <1991Apr3.170401.4903@netcom.COM> <18279@cadillac.CAD.MCC.COM> Sender: nobody@ucbvax.BERKELEY.EDU Distribution: usa Organization: U.C. Berkeley Lines: 38 In article <18279@cadillac.CAD.MCC.COM> ned%cad@MCC.COM (Ned Nowotny) writes: >Some of us would also like to link objects compiled by one C++ compiler with >objects compiled by another. Is the ANSI C++ committee looking into linking >and C++ object libraries? Or, does anyone care about libraries; modules as >opposed to classes; name space pollution; interoperability with compilers for >C, C++, Ada, etc. which may, by necessity, come from different vendors; and >so on? Yes, there certainly are good arguments for compatibility. >(By the way, are there any reasons, other than political, that G++ does not >use the same name mangling scheme as the one documented in the ARM? Or has >that changed since G++ 1.37.1?) You'd need to ask Mike Tiemann for the details. I do know this: FSF has always had a very strict policy against reading the code (e.g. Unix source code, cfront source code) that is being replaced by copylefted code, so they can avoid any accusation of theft of trade secrets, violation of copyright, etc. They also can't read any Bell Labs internal memos, etc, that document internals. When the first g++ came out, I doubt that the cfront mangling scheme was published anywhere in the open literature. How could he have found it out? From what I've seen, though, the cfront and g++ schemes are very similar. They could, perhaps, be made the same and maybe ANSI should look into this. This shouldn't be done by slavishly reverse engineering cfront; if the C++ community decides it needs to be done in a uniform way, the uniform way should be written up in a document and everyone should fix their compilers. Still, I think that in the long run name mangling should go away. For library compatibility, though, we need more than name mangling compatibility. We need to define the stream class (at least partially: vendors and libg++ could provide extra methods); we need to shoot those who want to name the base class of their library Object and therefore prevent anyone else from using it, etc. :-) -- Joe Buck jbuck@janus.berkeley.edu {uunet,ucbvax}!janus.berkeley.edu!jbuck