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: 1014db,6bdc5c27a0dec527 X-Google-Attributes: gid1014db,public X-Google-Thread: 1164f8,df8a3dc583bf1f5f X-Google-Attributes: gid1164f8,public From: "Martin Ambuhl" Subject: Re: Compaq prefers Alpha over Merced! BUT OF COURSE, ALPHA * Date: 1998/08/30 Message-ID: <6sd18p$jmt@news-central.tiac.net>#1/1 X-Deja-AN: 386298132 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> <35E9E464.AD231759@videotron.ca> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: Nocturnal Aviation Newsgroups: comp.os.vms,comp.sys.dec,comp.lang.c JF Mezei wrote in message <35E9E464.AD231759@videotron.ca>... | |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. =========== Please reread section 7.1.3 (and 7.13) of the standard before you attempt to "correct" Lawrence Kirby ("fred"). Any time you _do_ feel that he needs correcting, think again. He is not perfect, but the odds greatly favor his being right. If you do use "printf" as an identifier, you better make damn sure 1) it does not external linkage and 2) if it has file scope (which is almost certain), stdio.h is not included ========= | |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. ======= These are different implementations. If they are hosted systems, and the implementations are conforming, the standard allows only a small amount of implementation-defined behavior. After all the Scope (section 1) of the standard includes "the representation of output data produced by C programs". ======= | |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. ========== There is no such concept of "compiler itself" in the standard. If you want to make claims about freestanding implementations, feel free. But they will be meaningless to any general C or C++ newsgroup. A hosted implementation has very severe restrictions on your violations of the implementation's namespace.