Article View: comp.std.c
Article #5232Re: sizeof in #if?
From: William E. Davidsen Jr
Date: Tue, 26 Jul 1988 14:25
Date: Tue, 26 Jul 1988 14:25
20 lines
1589 bytes
1589 bytes
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.)
I guess some wording better be put back in fn74, since everywhere I
could find in the standard (including the index) sizeof is refered to as
an *operator* rather than a keyword or statement. As such I would expect
that it would function as well in #if as do +, -, etc. Perhaps this
should be clarified again, as it was in the 2nd draft.
--
bill davidsen (wedu@ge-crd.arpa)
{uunet | philabs | seismo}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me
Technical Details
Message-ID:
<11654@steinmetz.ge.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!steinmetz!davidsenReferences:
<705@bnr-rsc.UUCP> <11556@steinmetz.ge.com> <11637@steinmetz.ge.com> <12674@mimsy.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!steinmetz!davidsen From: davidsen@steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.std.c Subject: Re: sizeof in #if? Message-ID: <11654@steinmetz.ge.com> Date: 26 Jul 88 14:25:30 GMT References: <705@bnr-rsc.UUCP> <11556@steinmetz.ge.com> <11637@steinmetz.ge.com> <12674@mimsy.UUCP> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 20