Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mouton.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mouton!hammond From: hammond@mouton.UUCP Newsgroups: net.lang.c Subject: Re: RE: 6 char externs and the ANSI standard Message-ID: <178@mouton.UUCP> Date: Thu, 11-Oct-84 09:55:25 EDT Article-I.D.: mouton.178 Posted: Thu Oct 11 09:55:25 1984 Date-Received: Sat, 13-Oct-84 05:45:08 EDT References: <634@calgary.UUCP> Organization: AT&T Bell Laboratories, Murray Hill Lines: 19 I don't think you need a pre-processor, why not a post-processor? I.e. only when you do a "cc *.o -o executable" do you need to worry about the name clashes, and by then the compiler ought to have eliminated most parsing problems, since you're dealing with C specific objects. Advantages: C compiler can support arbitrary length identifiers. The post processor only has to worry about extern symbols. Can still support debugging by providing the mapping info. Disadvantages: Would not be able to link C ".o" files with other compiler files. Would require a "cc *.o" not an "ld *.o", but then most sensible makefiles I have seen do that anyway, since cc ought to know the library and loader flags needed. Rich Hammond PS As some of you kindly pointed out, my proposal to have the compiler check for symbol clashes does not work for separate compilation.