From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,2afd440a210c7fb0 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,df8a3dc583bf1f5f X-Google-Attributes: gid1164f8,public X-Google-Thread: 1014db,6bdc5c27a0dec527 X-Google-Attributes: gid1014db,public From: JF Mezei Subject: Re: Compaq prefers Alpha over Merced! BUT OF COURSE, ALPHA * Date: 1998/08/30 Message-ID: <35E9E464.AD231759@videotron.ca>#1/1 X-Deja-AN: 386269430 Content-Transfer-Encoding: 7bit References: <0095000017115526000002L062*@MHS> <6s910k$2bo$1@Starbase.NeoSoft.COM> <35e833be.0@news.wizvax.net> <6sac4v$4ti$1@Starbase.NeoSoft.COM> <35e8f9d7.0@news.wizvax.net> <904480575snz@genesis.demon.co.uk> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@videotron.net X-Trace: weber.videotron.net 904520352 207.96.132.85 (Sun, 30 Aug 1998 19:39:12 EDT) MIME-Version: 1.0 NNTP-Posting-Date: Sun, 30 Aug 1998 19:39:12 EDT Newsgroups: comp.os.vms,comp.sys.dec,comp.lang.c Lawrence Kirby wrote: > The names of standard library functions are reserved as identifiers with > external linkage. That means that it isn't valid for a user program to > provide definitions for them. Therefore a compiler is well within its rights > to inline calls to functions with external linkage that have the name of > a standard library function. That is not true. 1- The list of reserved words does not include function calls. The compiler has no idea what "printf" is supposed to do. It lets the linker figure out what to do with that reference. And the parameters given to the linker define where the linker will look for these references. 2- Some compilers are used to generate code for a different target platform. For instance, the DOS "TopSpeed" C compiler is used to generate code for the PSION handheld computers. Instead of linking against the DOS libraries, it links against the PSION supplied libraries, do the reference to "printf" results in a call to a different routine which is compatible with the PSION operating system (which is not DOS). Both platforms are 80x86 based but run different operating systems. There is no way that the actual compiler on DOS would know how to translate what a "printf" might result in. 3- There are some "includes" which do define macros with the same name as a standard function call. But that is not part of the compiler itself, it is part of the "package" which includes the "includes" and the library calls that are designed to integrate with the target operating system.