POSIX, ANSI C, and __STDC__
Mike Coffin
mike at arizona.edu
Sun Jan 22 05:37:11 AEST 1989
>From article <915 at sfmin.UUCP>, by dfp at sfmin.UUCP (D.F.Prosser):
> I would propose that __STDC__ be #defined to be 0 in C compilation systems
> that meet all ANSI C conformance requires except for:
> 1. the inclusion of nonconforming "common extensions" listed in A.6.5,
> 2. not issuing otherwise required diagnostics when language extensions
> are used, and/or
> 3. extra names declared or defined in standard headers.
> If __STDC__ is 1, the compilation system must be conforming.
This sounds to me like a very good system. Is there any chance that a
note to this effect could appear in pANS (as a footnote) or in the
rationale? I realize that pANS can not dictate the actions of
nonconforming compilers, but I think that if the above appeared ---
even as a footnote --- most compilers would honor it.
The last sentence is important. Cheating "just a little" when
__STDC__= 1 seems like the first step toward big trouble.
--
Mike Coffin mike at arizona.edu
Univ. of Ariz. Dept. of Comp. Sci. {allegra,cmcl2}!arizona!mike
Tucson, AZ 85721 (602)621-2858
More information about the Comp.std.c
mailing list