🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2529

Re: Want the word on __STDC__

#2529
From: Ray Butterworth
Date: Thu, 07 Mar 1991 19:47
27 lines
1745 bytes
In article <2986@cirrusl.UUCP> dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) writes:
>First, it is quite possible that a future ANSI C standard will bump up
>the value of __STDC__ to 2, thus breaking code that assumes that
>(__STDC__ != 1) implies (not standard C).

The failure to fully define __STDC__ was obviously a mistake,
and some vendors have thoroughly abused it.

Perhaps the next version of the standard could denegrate __STDC__
and introduce a new definition, say something like
   #define __ANSI_X3_159__ 1989
and explicitly say that
   #if defined(__ANSI_X3_159__)
is the recommended test for an ANSI Standard compiler.
One could also use tests such as
   #if __ANSI_X3_159__ < 2001
   #if __ANSI_X3_159__ == 1989
to check for the version of the Standard.
They should also state that if the symbol is defined with any
value other than those explicitly listed in the standard,
the compiler must generate a fatal error, rather than leaving
the behaviour as undefined as it is now with __STDC__.

If they really like the __STDC__ name though, they could
always say the same as above, but with (__STDC__ == 1)
having the same meaning as (__STDC__ = 1989), but using a
new symbol would probably avoid confusion.
Technical Details
Message-ID: <1991Mar7.194733.18150@watmath.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!rbutterw
References: <4755@lib.tmc.edu> <15260@smoke.brl.mil> <4203@lupine.NCD.COM> <15381@smoke.brl.mil> <668288453.3046@mindcraft.com> <2986@cirrusl.UUCP>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!rbutterw
From: rbutterw@watmath.waterloo.edu (Ray Butterworth)
Subject: Re: Want the word on __STDC__
Message-ID: <1991Mar7.194733.18150@watmath.waterloo.edu>
Organization: Math Faculty Computing Facility, University of Waterloo
References: <4755@lib.tmc.edu> <15260@smoke.brl.mil> <4203@lupine.NCD.COM> <15381@smoke.brl.mil> <668288453.3046@mindcraft.com> <2986@cirrusl.UUCP>
Date: Thu, 7 Mar 1991 19:47:33 GMT
Lines: 27