__STDC__ and non-strictly conforming ANSI C compilers

Jerry Schwarz jss at hector.UUCP
Thu Dec 15 15:57:20 AEST 1988


In article <9187 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>
>Note that macros such as "near" can be defined (as "__near", for
>example) in any non-standard header, as well as under control of
>compiler options or a special non-ANSI, backward-compatible
>version of the cc command.  The constraints against pollution of
>the name space by implementations is a great advance in sanity
>and should be taken quite seriously.

Lets suppose we take the version route.  Assume that the only
difference between the versions is the treatment of "near". The
question that started this topic was whether the non-conforming
version should define __STDC__.  My answer is yes.  I think Doug's
answer is no.

Does the answer depend on which of the following commands is used
to invoke the non-conforming compiler?

	xcc prog.c
	cc -extended prog.c
	cc -Dnear=__near prog.c

Jerry Schwarz
AT&T Bell Labs, Murray Hill


r



More information about the Comp.std.c mailing list