Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!jarthur!bridge2!3comvax!tymix!cirrusl!sunstorm!dhesi From: dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) Newsgroups: comp.std.c Subject: Re: Another sizeof question Message-ID: <2638@cirrusl.UUCP> Date: 31 Oct 90 03:01:59 GMT References: <13171@crdgw1.crd.ge.com> Sender: news@cirrusl.UUCP Organization: Cirrus Logic Inc. Lines: 20 In <13171@crdgw1.crd.ge.com> volpe@camelback.crd.ge.com (Christopher R Volpe) writes: >Can someone tell me whether "sizeof" expressions are allowed as >operands of "#if"? There do exist compilers that allow sizeof in expressions that are operands of #if. A careful reading of K&R between the lines suggests that sizeof in #if should be legal, but they don't outright say so. ANSI C disallows sizeof in #if so that the preprocessor may be implemented independently of the compiler. I was a little surprised to discover that ANSI C tries to allow the preprocessor to be separately implementable, but it does not require it to be separately available. -- Rahul Dhesi UUCP: oliveb!cirrusl!dhesi A pointer is not an address. It is a way of finding an address. -- me