🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5504

Re: __STDC__ and non-strictly conforming ANSI C compilers

#5504
From: Ray Butterworth
Date: Fri, 16 Dec 1988 14:45
22 lines
1624 bytes
In article <1988Dec15.183822.2559@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes:
> it would appear to me
> that only "#if __STDC__" is guaranteed to tell you whether it's a
> conforming implementation

I think everyone is missing something very obvious.
The only thing that is guaranteed is that "#if !defined(__STDC__)"
will guarantee that the compiler is NOT an ANSI Standard C compiler.

There is nothing to stop a compiler (or cpp or any header file)
from defining __STDC__, so long as that compiler doesn't make claims
to being an ANSI Standard C compiler.  I don't believe that ANSI
has registered __STDC__ as their trademark.  It might have been
a better idea to use the identifier __ANSI__ instead, since they
could then legitimitely complain if say BSD were to put something
like  "#define __STDC__(a,b,c) printf(a,b,c)"  into their stdio.h.
It would be a silly thing to do, but as long as BSD doesn't claim
to be a "conforming ANSI implementation", it can do what it likes.

i.e. The Standard only says how conforming implementations must behave.
It has no control over how any compiler or library behaves if that
compiler or library doesn't claim to be fully conforming.
Technical Details
Message-ID: <22765@watmath.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!watmath!rbutterworth
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!utgpu!watmath!rbutterworth
From: rbutterworth@watmath.waterloo.edu (Ray Butterworth)
Newsgroups: comp.std.c
Subject: Re: __STDC__ and non-strictly conforming ANSI C compilers
Message-ID: <22765@watmath.waterloo.edu>
Date: 16 Dec 88 14:45:52 GMT
References: <3236@pegasus.ATT.COM> <9167@smoke.BRL.MIL> <1988Dec15.183822.2559@utzoo.uucp>
Organization: U of Waterloo, Ontario
Lines: 22