Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!sun-barr!lll-winken!aunro!alberta!herald.usask.ca!ccu.umanitoba.ca!rpjday From: rpjday@ccu.umanitoba.ca Newsgroups: comp.lang.c Subject: Re: C language book recommendations Message-ID: <1991May21.125840.12654@ccu.umanitoba.ca> Date: 21 May 91 12:58:40 GMT References: <1991May6.101403.1@mscf.med.upenn.edu> <36770001@hpopd.pwd.hp.com> Organization: University of Manitoba, Winnipeg, Canada Lines: 32 In article <36770001@hpopd.pwd.hp.com> daves@hpopd.pwd.hp.com (Dave Straker) writes: >> C: A Reference Manual 3rd Edition >> Samuel P Harbison & Guy L Steele Jr >> Prentice Hall > >Seconded. This does seem to be a definitive work which is widely referenced. > Yup. Even the occasional annoying typo doesn't detract much. What typo? Glad you asked. Page 93, discussing the omitted storage class model which describes how external names are linked: "In this scheme, the storage class extern must be explicitly included on all referencing declarations, and the storage class must be omitted from the single defining declaration for each external variable. The defining declaration can include an initializer, but it is not required to do so. (It is illegal to have both an initializer and the storage class extern in a declaration.) This solution is probably the most common one, and the one adopted in ANSI C." On the very next page, in a table showing the legalities of various declarations in various models, we read that extern int x = 0 ; in the omitted storage class model is treated as a reference. However, according to the explanation on p. 93, this should be illegal. Comments? R. Day