🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #38666

Re: Mark Williams C

#38666
From: Daniel A. Glasser
Date: Thu, 18 May 1989 18:13
29 lines
1961 bytes
In article <8120@boring.cwi.nl>, steven@cwi.nl (Steven Pemberton) writes:
> 
> Surprisingly, Mark Williams C 2.0 already has a lot of ANSI C in it.
> But the naughties, they #define __STDC__ but do *not* implement all of
> ANSI C, so that programs that I have that compile differently
> depending on the absence or presence of __STDC__ don't work. It would
> have been better not to have defined __STDC__ until everything was
> implemented.
> 

__STDC__ is defined as 0 in MWC V3.0 (and earlier).  This means that the
compiler is NOT compliant with ANSI C in these releases.  The preprocessor,
however, is compliant in V3.0 and I believe 2.0 as well.  The simple
presence of the __STDC__ definition is not sufficient to tell if you
are using an ANSI compiler, you must check the value of the macro.
Ie, don't use "#ifdef __STDC__", use instead "#if __STDC__".  If the
macro is undefined, the #if evaluates to false.  If your preprocessor
does not allow #if on undefined symbols, it isn't even Unix V7 compatible.
Section 3.8.8 of the ANSI X3J11 standard defines __STDC__ to be the
decimal constant 1.

It is not the compiler that has it wrong...

						Daniel A. Glasser
-- 
 _____________________________________________________________________________
    Daniel A. Glasser                           One of those things that goes
    uwvax!per2!dag                              "BUMP!!!(ouch)" in the night. 
 ---Persoft, Inc.---------465 Science Drive-------Madison, WI 53711-----------
Technical Details
Message-ID: <857@per2.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!uwvax!per2!dag
References: <24094@agate.BERKELEY.EDU> <431fba10.14a1f@gtephx.UUCP> <8120@boring.cwi.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!uwvax!per2!dag
From: dag@per2.UUCP (Daniel A. Glasser)
Newsgroups: comp.sys.atari.st,comp.misc
Subject: Re: Mark Williams C
Summary: __STDC__ must be >= 1 to be ANSI Standard C
Message-ID: <857@per2.UUCP>
Date: 18 May 89 18:13:32 GMT
References: <24094@agate.BERKELEY.EDU> <431fba10.14a1f@gtephx.UUCP> <8120@boring.cwi.nl>
Organization: Persoft Inc., Madison, WI
Lines: 29