🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5489

Re: __STDC__ and non-strictly conforming ANSI C compilers

#5489
From: Doug Gwyn
Date: Wed, 14 Dec 1988 06:29
26 lines
1606 bytes
In article <3236@pegasus.ATT.COM> hansen@pegasus.att.com writes:
>What do people think a compiler should do with __STDC__ if it is not
>strictly conforming?

Obviously the actual standard cannot constrain nonconforming
implementations.  However, any implementation that defines
__STDC__ at all in a non-conforming mode is doing a severe
disservice to the C programming community.  __STDC__ is
intended to indicate standard conformance, and nothing else,
certainly not "sort of conforming but different in ways I
think you might like, sorry if it breaks your code".

Please don't define __STDC__ at all for non standard-
conforming implementations, even if they provide a lot of
so-called "ANSI C" features.  Programmers are likely to use
either
	#if __STDC__
or
	#ifdef __STDC__
to conditionalize sections of code based on "house C" vs.
"standard C".  In fact I already use the former that way.
I assume full ANSI C conformance when the test succeeds.
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.
Technical Details
Message-ID: <9167@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!ncar!tank!mimsy!haven!adm!smoke!gwyn
References: <3236@pegasus.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!ncar!tank!mimsy!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
Keywords: ANSI C, __STDC__
Message-ID: <9167@smoke.BRL.MIL>
Date: 14 Dec 88 06:29:14 GMT
References: <3236@pegasus.ATT.COM>
Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 25