MSC __STDC__ strange value

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Dec 6 08:42:39 AEST 1989


In article <841 at megatek.UUCP> hollen at eta.megatek.uucp (Dion Hollenbeck) writes:
>By the way,
>	#define __STDC__	/* evaluates  __STDC__ = 0  */

Nope, with this definition a subsequent
#if __STDC__
is an illegal program construct.

If __STDC__ had been entirely undefined (rather than defined as an
empty sequence of pp-tokens), then it is required to evaluate to 0,
although perhaps some older compilers might not understand that and
flag the #if as illegal even in that case.



More information about the Comp.lang.c mailing list