Article View: comp.std.c
Article #5250Re: Shifting question
From: Paul Jackson
Date: Thu, 28 Jul 1988 14:35
Date: Thu, 28 Jul 1988 14:35
23 lines
1466 bytes
1466 bytes
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
Technical Details
Message-ID:
<3677@hcr.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!attcan!lsuc!hcr!paulReferences:
<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>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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