🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5508

Re: __STDC__ and non-strictly conforming ANSI C compilers

#5508
From: Doug Gwyn
Date: Fri, 16 Dec 1988 21:33
27 lines
2051 bytes
In article <1988Dec15.183822.2559@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes:
-In article <9167@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
->I don't think I should have to write
->	#if __STDC__ == 1
->which would force me to perform massive edits when the next
->C standard bumps the value of __STDC__ to 2.
-Uh, Doug, why would you have to write the "== 1"?  "#if __STDC__" will
-fail if __STDC__ is defined as zero.  "#ifdef __STDC__" is a different
-story, mind you, but as I have pointed out in another posting, the
-difference between the two could be useful.

It was suggested that __STDC__ be given values other than 0 or 1,
which is what I was addressing with the above comment,

-The October draft says "__STDC__   The decimal constant 1, intended to
-indicate a conforming implementation.".  It does not seem to me that
-defining __STDC__ as 0 for an ANSI-like but non-conforming implementation
-is *clearly* a violation of this.  Furthermore, it would appear to me
-that only "#if __STDC__" is guaranteed to tell you whether it's a
-conforming implementation, and "#ifdef __STDC__" should not be relied on,
-given the existing wording.

Actually, nothing at all can be relied on in a non standard-conforming
environment, including __STDC__ differing from 1!  That's what we're
discussing!  I don't want __STDC__ to even be defined -- no matter what
its value -- in a non standard-conforming environment.  I've made the
arguments for that previously and shouldn't have to repeat them here.
Technical Details
Message-ID: <9210@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ncrlnk!ncrcae!hubcap!gatech!uflorida!haven!adm!smoke!gwyn
References: <3236@pegasus.ATT.COM> <9167@smoke.BRL.MIL> <1988Dec15.183822.2559@utzoo.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ncrlnk!ncrcae!hubcap!gatech!uflorida!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn )
Newsgroups: comp.std.c
Subject: Re: __STDC__ and non-strictly conforming ANSI C compilers
Message-ID: <9210@smoke.BRL.MIL>
Date: 16 Dec 88 21:33:04 GMT
References: <3236@pegasus.ATT.COM> <9167@smoke.BRL.MIL> <1988Dec15.183822.2559@utzoo.uucp>
Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 27