Newsgroups: comp.std.c Path: 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 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