sizeof() and #if

Jack Jansen jack at vu44.UUCP
Thu Jan 31 04:23:33 AEST 1985


I while ago, I tried something that I was almost sure would
fail (which it did), being:

#if sizeof(struct foobar) != BLKSIZ

I *know* why this fails, but still the most recent definition
I saw of #if is
#if <constant-expression>
which includes sizeof().
Does anyone know whether the new standard has changed this, or
changed the definition of constant-expression not to include
sizeof()?
Or is everyone supposed to integrate the preprocessor into the
compiler (yuck)?
-- 
	Jack Jansen, {seismo|philabs|decvax}!mcvax!vu44!jack
	or				       ...!vu44!htsa!jack
Help! How do I make a cup of tea while working with an acoustic modem?



More information about the Comp.lang.c mailing list