Article View: comp.std.c
Article #2456Re: Want the word on __STDC__
From: Henry Spencer
Date: Wed, 20 Feb 1991 17:57
Date: Wed, 20 Feb 1991 17:57
21 lines
1431 bytes
1431 bytes
In article <4755@lib.tmc.edu> dfenyes@thesis1.hsch.utexas.edu (David Fenyes) writes: >The question is: Does an ANSI cpp ALWAYS #define __STDC__, even if it >is used intentionally with a K&R compiler (#defined to 0)? An "ANSI cpp"? There is no such thing; there are only ANSI C implementations. ANSI C does not specify any aspect of the behavior that results if you use part of an ANSI C implementation in conjunction with something else. It does not even promise that this is possible at all, since many C compilers do not *have* a separate preprocessor. >Mark Williams uses an ANSI cpp with their non-ANSI compiler, and >#defines __STDC__ to 0, which causes all sorts of problems when code >tests #ifdef __STDC__ . . . (rather than #if __STDC__). > >Who is the offender? MWC, or those #ifdef'ers out there? MWC. Defining __STDC__ to be anything in a non-ANSI environment is a dumb thing to do. There is no portable meaning for a __STDC__ value of 0. -- "Read the OSI protocol specifications? | Henry Spencer @ U of Toronto Zoology I can't even *lift* them!" | henry@zoo.toronto.edu utzoo!henry
Technical Details
Message-ID:
<1991Feb20.175702.28682@zoo.toronto.edu>Path:
arc1-ca.pugleaf.net!utzoo!henryReferences:
<4755@lib.tmc.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: Want the word on __STDC__ Message-ID: <1991Feb20.175702.28682@zoo.toronto.edu> Organization: U of Toronto Zoology References: <4755@lib.tmc.edu> Date: Wed, 20 Feb 1991 17:57:02 GMT