🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5227

Re: sizeof in #if?

#5227
From: Chris Torek
Date: Tue, 26 Jul 1988 01:25
20 lines
1530 bytes
>henry@utzoo.uucp (Henry Spencer) writes:
>|You have an out-of-date draft, I believe.  The second-public-comment draft
>|(I haven't seen the third yet) explicitly forbids sizeof in this context.

In article <11637@steinmetz.ge.com> davidsen@steinmetz.ge.com
(William E. Davidsen Jr) answers:
>  I believe what I have is current. I got it a week ago and it's marked
>as THIRD public review. The many references were all based on that draft.

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.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris
Technical Details
Message-ID: <12674@mimsy.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!purdue!umd5!mimsy!chris
References: <705@bnr-rsc.UUCP> <11556@steinmetz.ge.com> <11637@steinmetz.ge.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!purdue!umd5!mimsy!chris
From: chris@mimsy.UUCP (Chris Torek)
Newsgroups: comp.std.c
Subject: Re: sizeof in #if?
Message-ID: <12674@mimsy.UUCP>
Date: 26 Jul 88 01:25:04 GMT
References: <705@bnr-rsc.UUCP> <11556@steinmetz.ge.com> <11637@steinmetz.ge.com>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 20