Newsgroups: comp.std.c Path: 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 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