__STDC__ and non-conforming ANSI C compilers

Colin Plumb w-colinp at microsoft.UUCP
Sat Jan 14 10:41:06 AEST 1989


Disclaimer: I have absolutely *nothing* to do with the people writing
the Microsoft C compiler.  This is a more general statement.

Personally, I generally thing setting __STDC__ to 0 if a compiler almost
makes it, but will parse ANSI C programs and, for the most part, compile
them, is a Good Thing.

It's not in violation of the standard, because the standard requires that
__STDC__ set to 1.  #if __STDC__ == 1 is the way to *really* test for
the strictest ANSI compliance.  But in 90% of the cases, it *does* handle
all that code people are writing that basically has

#ifdef __STDC__
/* prototype function declarations and macros using # and ## */
#else
/* old style declarations and macros using in-string replacement and /**/ */
#endif

as the author "intended".
-- 
	-Colin (uunet!microsof!w-colinp)



More information about the Comp.std.c mailing list