'sizeof' in preprocessing.

Eyal Lebedinsky eyal at echo.canberra.edu.au
Sat Oct 6 19:20:32 AEST 1990


In article <12672 at ogicse.ogi.edu> daniels at 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



More information about the Comp.std.c mailing list