__STDC__ and non-conforming ANSI C compilers
Mike Coffin
mike at arizona.edu
Fri Jan 20 11:26:34 AEST 1989
This is really getting messy. I originally advocated setting
__STDC__ = 0 to indicate "almost ANSI", or "so close to ANSI we doubt
if you'll notice." This was rejected essentially on the grounds that
if you set it to 0 it is easy to write code that accidentally thinks
that it is 1. (I.e., using #ifdef instead of #if.)
Now people are instead advocating setting it to 1 even if the compiler
is nonconforming, so long as the non-conformance is "minor" or
"harmless." Yuk! I think it is a BIG mistake to define
__STDC__ = 1 if the compiler is nonconforming. Please don't lie to
my code.
We started by arguing that "#ifdef __STDC__" should guarantee that the
compiler is conforming --- no ifs ands or buts. The point was made
that if it wasn't ANSI, no one knows WHAT it might be. Now we're
saying that even if you carefully write "#if __STDC__ = 1", you can't
expect to get ANSI compliance.
This sounds very bad.
--
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