🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1906

Re: Another sizeof question

#1906
From: Doug Gwyn
Date: Wed, 31 Oct 1990 23:28
13 lines
875 bytes
In article <13294@crdgw1.crd.ge.com> volpe@camelback.crd.ge.com (Christopher R Volpe) writes:
>But, could you or someone else point me to a reference in the Standard
>that says that a constant expression in a preprocessor context cannot
>contain sizeof?

It doesn't say that.  The following is strictly conforming:

	#define sizeof 42+
	#define a (-40)
	#if sizeof a > 2
	#include <banana.h>
	#endif
	#undef sizeof
Technical Details
Message-ID: <14287@smoke.brl.mil>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!haven!adm!smoke!gwyn
References: <13171@crdgw1.crd.ge.com> <1990Oct28.223702.27918@zoo.toronto.edu> <13294@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!wuarchive!udel!haven!adm!smoke!gwyn
From: gwyn@smoke.brl.mil (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Another sizeof question
Message-ID: <14287@smoke.brl.mil>
Date: 31 Oct 90 23:28:28 GMT
References: <13171@crdgw1.crd.ge.com> <1990Oct28.223702.27918@zoo.toronto.edu> <13294@crdgw1.crd.ge.com>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 13