🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1796

'sizeof' in preprocessing.

#1796
From: Eyal Lebedinsky
Date: Sat, 06 Oct 1990 09:20
15 lines
1125 bytes
In article <12672@ogicse.ogi.edu> daniels@ogicse.ogi.edu (Scott David Daniels) writes:
[...]
>point that the committee's position is on a very slippery slope.  Since 
>sizeof cannot be used to control preprocessing, I don't see where any 
Reading the standard, any 'constant-expression' is valid for #if, and sizeof
is yielding a constant. So, one should be able to say:
#if sizeof (a) == 2
etc. I read it a while ago and though it too bad my compiler won't do this.
No separate cpp will do it (unless it learns some C).
Comments? I was reading 3.8.1 7/88 draft.


-- 
Regards
	Eyal
Technical Details
Message-ID: <1990Oct6.092032.345@csc.canberra.edu.au>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!samsung!munnari.oz.au!csc.anu.oz.au!csc3.anu.oz.au!csc.canberra.edu.au!news
References: <12672@ogicse.ogi.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!samsung!munnari.oz.au!csc.anu.oz.au!csc3.anu.oz.au!csc.canberra.edu.au!news
From: eyal@echo.canberra.edu.au (Eyal Lebedinsky)
Newsgroups: comp.std.c
Subject: 'sizeof' in preprocessing.
Keywords: incomplete type, size, sizeof, preprocessor
Message-ID: <1990Oct6.092032.345@csc.canberra.edu.au>
Date: 6 Oct 90 09:20:32 GMT
References: <12672@ogicse.ogi.edu>
Sender: news@csc.canberra.edu.au
Organization: none
Lines: 15