Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site kuling.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!enea!kuling!thomas From: thomas@kuling.UUCP (Thomas H{meenaho) Newsgroups: net.lang.c,net.unix-wizards Subject: Re: Prepending _ in C external names necessary? Message-ID: <861@kuling.UUCP> Date: Thu, 5-Dec-85 00:51:26 EST Article-I.D.: kuling.861 Posted: Thu Dec 5 00:51:26 1985 Date-Received: Sun, 8-Dec-85 03:02:08 EST References: <1232@hpda.UUCP> <851@kuling.UUCP> <3040@sun.uucp> Reply-To: thomas@kuling.UUCP (Thomas H{meenaho) Organization: The Royal Inst. of Techn., Stockholm Lines: 27 Xref: watmath net.lang.c:7335 net.unix-wizards:16000 In article <3040@sun.uucp> guy@sun.uucp (Guy Harris) writes: >> >We're considering changing our C compiler to *not* prepend an underscore >> >at the beginning of all external names (functions, variables). >> >> I say don't do it! >> >This was (according to DMR) the reason this was done in the first place. I >believe the 3Bs assemblers do not pre-define names like "r0" for the >registers (I think you say something like "%0"), so they can get away with >it. I don't like this method of separating register names from identifiers. In the SysV port for the 68K from Motorola they do just that. The net result is that while you might save a few _:s, you loose much readability of the assembler code. The silly %:s makes the code almost unreadable. For C programs it doesn't really matter but when you're forced to do something in assembler it's a pain. I can't see the point why anyone would rather use the verrry frequent %:s in favor of the rare _:s. -- Thomas Hameenaho, Dept. of Computer Science, Uppsala University, Sweden Phone: +46 18 138650 UUCP: thomas@kuling.UUCP (...!{seismo,mcvax}!enea!kuling!thomas)