Path: utzoo!attcan!uunet!husc6!rutgers!mailrus!uflorida!novavax!proxftl!bill From: bill@proxftl.UUCP (T. William Wells) Newsgroups: comp.std.c Subject: Re: sizeof in #if? Message-ID: <539@proxftl.UUCP> Date: 26 Jul 88 13:14:35 GMT References: <705@bnr-rsc.UUCP> <11556@steinmetz.ge.com> <11637@steinmetz.ge.com> <12674@mimsy.UUCP> Reply-To: bill@proxftl.UUCP (T. William Wells) Organization: Proximity Technology, Ft. Lauderdale Lines: 17 Summary: Expires: Sender: Followup-To: Distribution: Keywords: In article <12674@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: : That should be the May 13, 1988 draft. See footnote 74 on page 84. : While the explicit wording against sizeof is gone (yet the explicit : prohibition of casts remains), the footnote remarks that the expression : is evaluated in translation phase 4, where keywords do not yet exist. : Hence the token `sizeof' is either defined (via #define) as some other : token, or is simply an identifier token: it cannot be used to find the : size of an object. (Likewise, all types do not yet exist as keywords, : hence casts are implicitly impossible, although this is less obvious.) The committee has made it clear that the preprocessor should be able to be written independently of the execution environment. This is the rationale behind a number of disquieting things (e.g., character constants not having to be the same to the preprocessor and in the execution environment). From that standpoint, the preprocessor could not be aware of sizeof as that would be dependent on the execution environment.