__STDC__ and non-conforming ANSI C compilers

Mark H. Colburn mark at jhereg.Jhereg.MN.ORG
Fri Jan 20 07:54:31 AEST 1989


In article <2797 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>By the by, some people are claiming that putting '-DFOO' on the command
>line makes the compiler non-conforming.

I do not think that the -DFOO on the command line should invalidate the
__STDC__ flag.  Think of it this way:  the -DFOO was specified by the user,
not the compiler itself, therefore, it should be allowed.  

How would this be different from the user specifying #define FOO on the
first line of the compilation unit?  Unless, of course, the user is not 
allowed to corrupt the namespace of the compiler either, which would make
using the compiler at all a non-portable application.  (More :-)'s than 
you can imagine.)

By the same token, the user could specify -D__STDC__ on the command line
to the C compiler.  That would not necessarily make the compiler being
used an ANSI C conforming compiler...

-- 
Mark H. Colburn                  "They didn't understand a different kind of 
NAPS International                smack was needed, than the back of a hand, 
mark at jhereg.mn.org                something else was always needed."



More information about the Comp.std.c mailing list