🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2
Article #262

Re: MSC __STDC__ strange value

#262
From: Henry Spencer
Date: Tue, 05 Dec 1989 16:43
27 lines
1265 bytes
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
Technical Details
Message-ID: <1989Dec5.164318.26510@utzoo.uucp>
Path: arc1-ca.pugleaf.net!utzoo!henry
References: <223@bohra.cpg.oz>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2,comp.lang.c,comp.std.c
Path: arc1-ca.pugleaf.net!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