Xref: utzoo comp.os.os2:318 comp.lang.c:24259 comp.std.c:2231 Newsgroups: comp.os.os2,comp.lang.c,comp.std.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: MSC __STDC__ strange value Message-ID: <1989Dec5.164318.26510@utzoo.uucp> Organization: U of Toronto Zoology References: <223@bohra.cpg.oz> Date: Tue, 5 Dec 89 16:43:18 GMT In article <223@bohra.cpg.oz> ejp@bohra.cpg.oz (Esmond Pitt) writes: >For some strange reason, the MSC 5.1 compiler defines __STDC__ as 0, so > >#if __STDC__ >... >#endif > >yields a different result from > >#ifdef __STDC__ >... >#endif > >Why? Are you asking why the results are different, or why __STDC__ is defined oddly? If the former, __STDC__ is defined but 0, which means that #ifdef says "yes" but #if says "no". If the latter, consider the possibility that Microsoft is being stupid (heaven knows there is plenty of evidence for this in other areas...). Actually, one can weakly defend defining __STDC__ as 0 for a compiler which conforms to ANSI C in every way except for name-space pollution. Microsoft probably hasn't been smart enough to get that right, though. -- Mars can wait: we've barely | Henry Spencer at U of Toronto Zoology started exploring the Moon. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu