🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5576

Re: __STDC__ and non-conforming ANSI C compilers

#5576
From: Colin Plumb
Date: Sat, 14 Jan 1989 00:41
21 lines
1233 bytes
Disclaimer: I have absolutely *nothing* to do with the people writing
the Microsoft C compiler.  This is a more general statement.

Personally, I generally thing setting __STDC__ to 0 if a compiler almost
makes it, but will parse ANSI C programs and, for the most part, compile
them, is a Good Thing.

It's not in violation of the standard, because the standard requires that
__STDC__ set to 1.  #if __STDC__ == 1 is the way to *really* test for
the strictest ANSI compliance.  But in 90% of the cases, it *does* handle
all that code people are writing that basically has

#ifdef __STDC__
/* prototype function declarations and macros using # and ## */
#else
/* old style declarations and macros using in-string replacement and /**/ */
#endif

as the author "intended".
-- 
	-Colin (uunet!microsof!w-colinp)
Technical Details
Message-ID: <264@microsoft.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!cornell!uw-beaver!microsoft!w-colinp
References: <898@ubu.warwick.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!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: <264@microsoft.UUCP>
Date: 14 Jan 89 00:41:06 GMT
References: <898@ubu.warwick.UUCP>
Reply-To: w-colinp@microsoft.uucp (Colin Plumb)
Organization: very little
Lines: 21