🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5650

Re: __STDC__ and non-conforming ANSI C compilers

#5650
From: Colin Plumb
Date: Sat, 21 Jan 1989 04:02
17 lines
1385 bytes
peter@ficc.uu.net (Peter da Silva) wrote:
> If you really want to survive __STDC__==0, then here's a workable solution...

> This will mean you will always have __STDC__ defined as 0 or 1.

No, no, no... the argument (and I'm starting to see the opposition's
points) is that *almost* ANSI-compliant compilers (i.e. ones that
accept all the ANSI C syntax features, but may have polluted namespaces),
should #define __STDC__ 0.  K&R compilers should not define it at all.

Basically, this tells you the compiler won't barf on prototypes or
forward struct references or const or volatile or unary + or ...
or # and ## or defined() or any such ANSIism.  You still have to worry
about finding the right headers and strrchr and all the library mess
that currently exists.  The compiler comes halfway.
-- 
	-Colin (uunet!microsof!w-colinp)
Technical Details
Message-ID: <320@microsoft.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!nosc!ucsd!rutgers!mailrus!cornell!uw-beaver!microsoft!w-colinp
References: <9391@smoke.BRL.MIL> <8731@megaron.arizona.edu> <9405@smoke.BRL.MIL> <9422@smoke.BRL.MIL> <2820@ficc.uu.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!nosc!ucsd!rutgers!mailrus!cornell!uw-beaver!microsoft!w-colinp
From: w-colinp@microsoft.UUCP (Colin Plumb)
Newsgroups: comp.std.c
Subject: Re: __STDC__ and non-conforming ANSI C compilers
Message-ID: <320@microsoft.UUCP>
Date: 21 Jan 89 04:02:50 GMT
References: <9391@smoke.BRL.MIL> <8731@megaron.arizona.edu> <9405@smoke.BRL.MIL> <9422@smoke.BRL.MIL> <2820@ficc.uu.net>
Reply-To: w-colinp@microsoft.uucp (Colin Plumb)
Organization: very little
Lines: 17