🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1907

Re: Another sizeof question

#1907
From: Rahul Dhesi
Date: Wed, 31 Oct 1990 03:01
20 lines
1263 bytes
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 <dhesi%cirrusl@oliveb.ATC.olivetti.com>
UUCP:  oliveb!cirrusl!dhesi
A pointer is not an address.  It is a way of finding an address. -- me
Technical Details
Message-ID: <2638@cirrusl.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!jarthur!bridge2!3comvax!tymix!cirrusl!sunstorm!dhesi
References: <13171@crdgw1.crd.ge.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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