Path: utzoo!utgpu!attcan!lsuc!hcr!paul From: paul@hcr.UUCP (Paul Jackson) Newsgroups: comp.std.c Subject: Re: Shifting question Message-ID: <3677@hcr.UUCP> Date: 28 Jul 88 14:35:52 GMT References: <705@bnr-rsc.UUCP> <11556@steinmetz.ge.com> <1988Jul19.173807.6604@utzoo.uucp> <11606@steinmetz.ge.com> <1988Jul23.231300.22872@utzoo.uucp> <11637@steinmetz.ge.com> Reply-To: paul@hcr.UUCP (Paul Jackson) Organization: HCR Corporation, Toronto Lines: 23 In article <11637@steinmetz.ge.com> davidsen@crdos1.UUCP (bill davidsen) writes: >[Much stuff on the legality of sizeof in the preprocessor >Chris Tokek said that there was a obscure phrase which >disallowed use of sizeof in the preprocessor, but 3.8.1 on the >-- > bill davidsen (wedu@ge-crd.arpa) > {uunet | philabs | seismo}!steinmetz!crdos1!davidsen >"Stupidity, like virtue, is its own reward" -me There is a footnote (number 74) on page 84 of the draft that explains the reasoning of the committee "Because the controlling constant expression is evaluated during translation phase 4, all identifiers either are or are not macro names - there simply are no keywords, enumeration constants, and so on." Because of the phases of translation, the whole question of whether sizeof is legal just doesn't arise. Admittedly one has to read the standard very carefully to realize this, but that is why the footnote was added. Paul Jackson (utzoo|utcsri)!hcr!paul