Evidence that __STDC__ should be used properly
Doug Gwyn
gwyn at smoke.BRL.MIL
Wed Jul 26 22:36:02 AEST 1989
Here is additional evidence why it is NOT "helpful" for C compilers that
provide support for functions prototypes to advertise themselves as "ANSI
C compatible" via __STDC__ when they don't fully conform to the Standard:
[Extracted from a trip report I recently received:]
The equipment available for the feasibility study was an Apollo
DN-1000, running the very latest version of UNIX from Apollo,
version SR10.1. ... our first task was to "port" the software
over. This took a significant amount of time, owing to various
deficiencies in the Apollo software. ...
The C compiler on the Apollo identifies itself as an ANSI-Standard
compiler (__STDC__ = 1), yet numerous ANSI features were missing,
including "#" token-pasting and the "const" keyword. In addition,
the ANSI header files stdlib.h, stdarg.h, stddef.h did not exist.
The ANSI "stdarg" implementation (using the "..." notation) did
not work. The older "varargs" implementation conflicted with all
the function prototypes. With -U__STDC__, the old "varargs"
package came to life.
More information about the Comp.std.c
mailing list