Another sizeof question

Christopher R Volpe volpe at camelback.crd.ge.com
Sun Oct 28 18:40:49 AEST 1990


Can someone tell me whether "sizeof" expressions are allowed as 
operands of "#if"? I'm trying to do some conditional compilation
based on the size of some data structure, and I get parse errors
before sizeof. The Bible says "sizeof" yields a constant integer,
and that #if requires an integral constant expression, so I can't
tell what's wrong. Can someone clue me in? Thanks.

BTW, I'm using gcc to compile.

==================
Chris Volpe
G.E. Corporate R&D
volpecr at crd.ge.com



More information about the Comp.std.c mailing list