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: firewind@aurdev.com Subject: Re: Compaq prefers Alpha over Merced! BUT OF COURSE, ALPHA * Date: 1998/08/31 Message-ID: #1/1 X-Deja-AN: 386610530 Sender: firewind 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> <6scur7$qtk@bgtnsc02.worldnet.att.net> <35EA0E22.C59E9476@videotron.ca> Organization: WinStar GoodNet, Inc. User-Agent: tin/pre-1.4-980226 (UNIX) (Linux/2.1.117 (i686)) NNTP-Posting-Date: Mon, 31 Aug 1998 16:56:26 MDT Newsgroups: comp.os.vms,comp.sys.dec,comp.lang.c In comp.lang.c JF Mezei wrote: > I suggest you check Kernigham and Ritchie, 1978 edition. 1978 edition? How delightfully ancient! Surely you know that two standards regulating C have been passed since then, with a third on the way? K&R1 (nor K&R2) is representative of the language at this time. In fact, K&R1 -never- was representative of the state of C. > Appendix A (starts at page 214) > Or better yet, the official list of reserved words at page 180 (again > appendix A). For those of us following along in the newer edition, the list referred to can be found on page 192. The section is A2.4, Keywords, and reads as follows: The following identifiers are reserved *for use as keywords*, and may not be used otherwise: [list of 32 keywords ommitted] The emphasis in the above quote is mine, not K&R. Perhaps I have the wrong book, but I am unable to find the phrase 'reserved words' in that section. The purpose of the section is -merely- to list the 32 keywords that are -always- reserved. Other identifiers are reserved in other contexts, and the reference you provide, quoted above, does NOT refute this. > Nop, because the compiler does not know to what library the object module will > eventually be linked with. Case in point: on a VAX-VMS, you can link against > the VAXCRTL or DECCRTL libraries, which, while similar, have significanto > differences. Linkers? Libraries? What are those? Object modules? Huh? You back up your assertion that the compiler -may not- 'know' about 'printf()' by providing an example implimentation where it does not. I'm curious, have you ever read the standard? Or even glanced at it? We're not talking about what can or what does happen. We are talking about what -may- happen, and the fact is that the standard allows for an implimentation where -no- linker exists, and code for standard functions is directly inserted by the compiler. > Quoting from K&R, page 1: > "Finally, C itself provides no input-output facilities: there are no READ or > WRITE statements, and no wired-in file access methods. All these higher- > level mechanisms *MUST* be provided by explicitely called functions." > (emphasis on MUST is mine). > By that definition alone, a compiler which assumes a certain behaviour for > printf and translates it to inline code instead of a call to the printf > routine in a library would not adhere to the C standards. Must be a > Microsoft compiler. Sorry, incorrect. Besides the fact that, once again, K&R != ISO, your reading of the quoted passage is fatally flawed. It reads 'must be provided by *explicitly* called functions,' (emphasis mine) not '*external* called func- tions.' -Nowhere- does the passage you quote prohibit insertion of code by the compiler. > Disagree. If you do not have a #include that defines the macro, the use of > your "keyword" will result in a function call to be resolved by the linker. Again: what linker? -- (cfgwgid)