🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1797

Re: 'sizeof' in preprocessing.

#1797
From: Henry Spencer
Date: Sat, 06 Oct 1990 23:25
14 lines
1148 bytes
In article <1990Oct6.092032.345@csc.canberra.edu.au> eyal@echo.canberra.edu.au (Eyal Lebedinsky) writes:
>Reading the standard, any 'constant-expression' is valid for #if, and sizeof
>is yielding a constant...
>No separate cpp will do it (unless it learns some C).
>Comments? I was reading 3.8.1 7/88 draft.

You've either missed something or your draft is simply too far out of date.
(I can't remember what this looked like in 7/88.)  A very subtle point of
the interpretation of #if expressions is that keywords are not recognized
at all, so there is no way to write a sizeof.  This is specifically there to
permit separate preprocessors.
-- 
Imagine life with OS/360 the standard  | Henry Spencer at U of Toronto Zoology
operating system.  Now think about X.  |  henry@zoo.toronto.edu   utzoo!henry
Technical Details
Message-ID: <1990Oct6.232523.28337@zoo.toronto.edu>
Path: arc1-ca.pugleaf.net!utzoo!henry
References: <12672@ogicse.ogi.edu> <1990Oct6.092032.345@csc.canberra.edu.au>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: 'sizeof' in preprocessing.
Message-ID: <1990Oct6.232523.28337@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <12672@ogicse.ogi.edu> <1990Oct6.092032.345@csc.canberra.edu.au>
Date: Sat, 6 Oct 90 23:25:23 GMT