🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5623

Re: __STDC__ and non-conforming ANSI C compilers

#5623
From: Jim Gardner
Date: Thu, 19 Jan 1989 07:39
16 lines
1360 bytes
In article <8742@megaron.arizona.edu> mike@arizona.edu (Mike Coffin) writes:
:From article <358@masscomp.UUCP>, by ftw@masscomp.UUCP (Farrell Woods):
:> If I invoke a conforming compiler with "cc -DFOO", but my program
:> has #ifdef __STDC__ in it, how does this break conformance?
:
:If "cc -DFOO" has the effect of providing of predefining FOO, then it
:does not provide a conforming compilation environment: the program's
:name space has been polluted.  So I assume that __STDC__ will not be
:defined in such cases.  Do you think this should be an exception?  If
:so, do you have any other exceptions in mind?

You're viewing the -DFOO as changing the compiler. Alternatively, you can
view it as an option that specifies the C source input, inserting a
"#define FOO" and "#line 1" lines before the first line of the
"source file". The translation environment is not changed, but the input 
source is specified in a peculiar way.
Technical Details
Message-ID: <23151@watmath.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!jagardner
References: <358@masscomp.UUCP> <8742@megaron.arizona.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!jagardner
From: jagardner@watmath.waterloo.edu (Jim Gardner)
Newsgroups: comp.std.c
Subject: Re: __STDC__ and non-conforming ANSI C compilers
Message-ID: <23151@watmath.waterloo.edu>
Date: 19 Jan 89 07:39:41 GMT
References: <358@masscomp.UUCP> <8742@megaron.arizona.edu>
Reply-To: jagardner@watmath.waterloo.edu (Jim Gardner)
Organization: U. of Waterloo, Ontario
Lines: 16