Want the word on __STDC__

Ron Guilmette rfg at NCD.COM
Sun Mar 3 09:21:16 AEST 1991


In article <15260 at smoke.brl.mil> gwyn at smoke.brl.mil (Doug Gwyn) writes:
>
>Having said that, I would add that implementors who #define __STDC__
>to anything at all in non-conforming variants of their compilers are
>not doing anyone a favor, and I wish they would desist from that
>practice.

I assume that you also get irrate about implementors who define __STDC__
to something other than 1.

AT&T's CI5 C compiler (for SVR4) can do any one of the following three
possible things (depending upon the options used):

	leave __STDC__ undefined
	predefine __STDC__ to 0
	predefine __STDC__ to 1

The corresponding three "compilation modes" are (respectively):

	compile using both K&R and ANSI rules but use K&R rules in
	cases where there are conflicts

	compile using both K&R and ANSI rules but use ANSI rules in
	cases where there are conflicts

	compile using only ANSI rules (but with some standard comforming
	extensions)

-- 

// Ron Guilmette  -  C++ Entomologist
// Internet: rfg at ncd.com      uucp: ...uunet!lupine!rfg
// New motto:  If it ain't broke, try using a bigger hammer.



More information about the Comp.std.c mailing list