Path: utzoo!attcan!uunet!husc6!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.std.c Subject: Re: __STDC__ and non-strictly conforming ANSI C compilers Message-ID: <9241@smoke.BRL.MIL> Date: 27 Dec 88 06:42:37 GMT References: <3236@pegasus.ATT.COM> <9167@smoke.BRL.MIL> <1988Dec15.183822.2559@utzoo.uucp> <22765@watmath.waterloo.edu> <14179@oberon.USC.EDU> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 23 In article <14179@oberon.USC.EDU> english@stromboli.usc.edu (Joe English) writes: >I'm still unclear on the meaning of __STDC__... does it mean >"supports prototypes, void, signed, etc.," or "strictly conforming, >no extensions?" Or is this not specified? __STDC__ must be defined (and have the value 1) by any conforming implementation. There are not "degrees" or "levels" of conformance; either an implementation is standard conforming or it is not. (There are, however, both "freestanding" and "hosted" environments, and an implementation conforms to at most one of these at a time.) The intention is for the very fact that __STDC__ is defined to suffice to tip off the application source code that the C Standard is conformed to, which enables it to use features not available in older C compilers as well as to help accommodate changes mandated by the Standard in a specific environment (unsigned-preserving to value-preserving in UNIX environments, for example). Somewhere along the way it was decided that just being "defined" was too vague, so for this version of the Standard at least, __STDC__ has the value 1. It really was not envisioned that non-conforming implementations would define __STDC__ at all. (But of course the Standard is technically unable to constrain non-conforming implementations.)