Want the word on __STDC__
Henry Spencer
henry at zoo.toronto.edu
Thu Feb 21 04:57:02 AEST 1991
In article <4755 at lib.tmc.edu> dfenyes at 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 at zoo.toronto.edu utzoo!henry
More information about the Comp.std.c
mailing list